pushing to public repository using git bash












0















I know how to push to github ( to my own) but i want to know how to push or add something to some other repository, for example today one of my friends sent me message that he has made a repository for our project and sent me https://github.com/******/****?fbclid=IwAR0tE2DKtuKKzhtqMV-NvS9_YuSkq-abHu7QY2tcESOuFOu1kGT_PxFJR7Y
and he asked me to put our project to that repository, how is that possible ?
i tried ' git push < url > ' and it says 'not valid: is this a git repository?'










share|improve this question

























  • please refer to help.github.com/articles/…

    – William Chong
    Nov 21 '18 at 7:39











  • He/She most invite you as the repository contributor.

    – Hamed Akhlaghi
    Nov 21 '18 at 7:42
















0















I know how to push to github ( to my own) but i want to know how to push or add something to some other repository, for example today one of my friends sent me message that he has made a repository for our project and sent me https://github.com/******/****?fbclid=IwAR0tE2DKtuKKzhtqMV-NvS9_YuSkq-abHu7QY2tcESOuFOu1kGT_PxFJR7Y
and he asked me to put our project to that repository, how is that possible ?
i tried ' git push < url > ' and it says 'not valid: is this a git repository?'










share|improve this question

























  • please refer to help.github.com/articles/…

    – William Chong
    Nov 21 '18 at 7:39











  • He/She most invite you as the repository contributor.

    – Hamed Akhlaghi
    Nov 21 '18 at 7:42














0












0








0








I know how to push to github ( to my own) but i want to know how to push or add something to some other repository, for example today one of my friends sent me message that he has made a repository for our project and sent me https://github.com/******/****?fbclid=IwAR0tE2DKtuKKzhtqMV-NvS9_YuSkq-abHu7QY2tcESOuFOu1kGT_PxFJR7Y
and he asked me to put our project to that repository, how is that possible ?
i tried ' git push < url > ' and it says 'not valid: is this a git repository?'










share|improve this question
















I know how to push to github ( to my own) but i want to know how to push or add something to some other repository, for example today one of my friends sent me message that he has made a repository for our project and sent me https://github.com/******/****?fbclid=IwAR0tE2DKtuKKzhtqMV-NvS9_YuSkq-abHu7QY2tcESOuFOu1kGT_PxFJR7Y
and he asked me to put our project to that repository, how is that possible ?
i tried ' git push < url > ' and it says 'not valid: is this a git repository?'







git github github-api






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 '18 at 7:35









David Jacquel

37.9k377107




37.9k377107










asked Nov 20 '18 at 18:12









waleedd32waleedd32

11419




11419













  • please refer to help.github.com/articles/…

    – William Chong
    Nov 21 '18 at 7:39











  • He/She most invite you as the repository contributor.

    – Hamed Akhlaghi
    Nov 21 '18 at 7:42



















  • please refer to help.github.com/articles/…

    – William Chong
    Nov 21 '18 at 7:39











  • He/She most invite you as the repository contributor.

    – Hamed Akhlaghi
    Nov 21 '18 at 7:42

















please refer to help.github.com/articles/…

– William Chong
Nov 21 '18 at 7:39





please refer to help.github.com/articles/…

– William Chong
Nov 21 '18 at 7:39













He/She most invite you as the repository contributor.

– Hamed Akhlaghi
Nov 21 '18 at 7:42





He/She most invite you as the repository contributor.

– Hamed Akhlaghi
Nov 21 '18 at 7:42












3 Answers
3






active

oldest

votes


















0















  1. Clone your friend repository:


git clone https://github.com/******/****.git




  1. Make your own branch:


git checkout -b new_branch_name




  1. Add or edit code

  2. Add new new files


git add -A




  1. Commit files:


`git commit -m "Commit message"




  1. Push files:


git push -u origin new_branch_name




  1. Make pull request in github from new_branch_name to master branch of project






share|improve this answer

































    0














    The shared url doesn't look like a link to repository.
    There are two options provided by github. https and ssh.



    https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git which starts with *https* ends with .git



    ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git which starts with *git@* ends with .git



    After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.






    share|improve this answer































      0














      There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings at the top and then Collaborators on the left.



      You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:



      git add remote mybuddy https://github.com/mybuddy/someproject
      # Note that there is no ?fbclid=IwAR*** etc


      and list them with



      git remote -v


      Then instead of pushing to origin you can push to mybuddy as well.






      share|improve this answer























        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399063%2fpushing-to-public-repository-using-git-bash%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0















        1. Clone your friend repository:


        git clone https://github.com/******/****.git




        1. Make your own branch:


        git checkout -b new_branch_name




        1. Add or edit code

        2. Add new new files


        git add -A




        1. Commit files:


        `git commit -m "Commit message"




        1. Push files:


        git push -u origin new_branch_name




        1. Make pull request in github from new_branch_name to master branch of project






        share|improve this answer






























          0















          1. Clone your friend repository:


          git clone https://github.com/******/****.git




          1. Make your own branch:


          git checkout -b new_branch_name




          1. Add or edit code

          2. Add new new files


          git add -A




          1. Commit files:


          `git commit -m "Commit message"




          1. Push files:


          git push -u origin new_branch_name




          1. Make pull request in github from new_branch_name to master branch of project






          share|improve this answer




























            0












            0








            0








            1. Clone your friend repository:


            git clone https://github.com/******/****.git




            1. Make your own branch:


            git checkout -b new_branch_name




            1. Add or edit code

            2. Add new new files


            git add -A




            1. Commit files:


            `git commit -m "Commit message"




            1. Push files:


            git push -u origin new_branch_name




            1. Make pull request in github from new_branch_name to master branch of project






            share|improve this answer
















            1. Clone your friend repository:


            git clone https://github.com/******/****.git




            1. Make your own branch:


            git checkout -b new_branch_name




            1. Add or edit code

            2. Add new new files


            git add -A




            1. Commit files:


            `git commit -m "Commit message"




            1. Push files:


            git push -u origin new_branch_name




            1. Make pull request in github from new_branch_name to master branch of project







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 21 '18 at 8:11

























            answered Nov 21 '18 at 7:52









            IlkoIlko

            3951412




            3951412

























                0














                The shared url doesn't look like a link to repository.
                There are two options provided by github. https and ssh.



                https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git which starts with *https* ends with .git



                ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git which starts with *git@* ends with .git



                After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.






                share|improve this answer




























                  0














                  The shared url doesn't look like a link to repository.
                  There are two options provided by github. https and ssh.



                  https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git which starts with *https* ends with .git



                  ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git which starts with *git@* ends with .git



                  After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.






                  share|improve this answer


























                    0












                    0








                    0







                    The shared url doesn't look like a link to repository.
                    There are two options provided by github. https and ssh.



                    https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git which starts with *https* ends with .git



                    ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git which starts with *git@* ends with .git



                    After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.






                    share|improve this answer













                    The shared url doesn't look like a link to repository.
                    There are two options provided by github. https and ssh.



                    https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git which starts with *https* ends with .git



                    ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git which starts with *git@* ends with .git



                    After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 21 '18 at 7:44









                    Jacob NelsonJacob Nelson

                    486416




                    486416























                        0














                        There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings at the top and then Collaborators on the left.



                        You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:



                        git add remote mybuddy https://github.com/mybuddy/someproject
                        # Note that there is no ?fbclid=IwAR*** etc


                        and list them with



                        git remote -v


                        Then instead of pushing to origin you can push to mybuddy as well.






                        share|improve this answer




























                          0














                          There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings at the top and then Collaborators on the left.



                          You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:



                          git add remote mybuddy https://github.com/mybuddy/someproject
                          # Note that there is no ?fbclid=IwAR*** etc


                          and list them with



                          git remote -v


                          Then instead of pushing to origin you can push to mybuddy as well.






                          share|improve this answer


























                            0












                            0








                            0







                            There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings at the top and then Collaborators on the left.



                            You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:



                            git add remote mybuddy https://github.com/mybuddy/someproject
                            # Note that there is no ?fbclid=IwAR*** etc


                            and list them with



                            git remote -v


                            Then instead of pushing to origin you can push to mybuddy as well.






                            share|improve this answer













                            There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings at the top and then Collaborators on the left.



                            You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:



                            git add remote mybuddy https://github.com/mybuddy/someproject
                            # Note that there is no ?fbclid=IwAR*** etc


                            and list them with



                            git remote -v


                            Then instead of pushing to origin you can push to mybuddy as well.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 21 '18 at 7:44









                            ConnerConner

                            23.5k84568




                            23.5k84568






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399063%2fpushing-to-public-repository-using-git-bash%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                這個網誌中的熱門文章

                                Tangent Lines Diagram Along Smooth Curve

                                Yusuf al-Mu'taman ibn Hud

                                Zucchini