Git create remote repository on push

前端 未结 4 484
执念已碎
执念已碎 2020-12-28 15:28

I have been trying to figure this one out but I am having a hard time doing so. I am currently working on an open source project that requires me to allow a user to

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-28 15:56

    1. Checkout and track the branch from the remote:

      git checkout -t origin/funbranch
      
    2. Branch off of it:

      git checkout -b mybranch
      
    3. Push your new one up, it will create a new branch automatically on the remote:

      git push origin mybranch
      

    It should say "created new remote branch origin/mybranch"

    If you are still getting "Remote end Hung up", it sounds like a security thing. Do you have SSH keys installed correctly, and do you have write permissions on the remote server?

    The way most open source projects work, you have to create a fork (a clone inherently) that you use to do your work because most of the time you don't have write permissions to the repo. When you have changes, you will then send a pull request to the repository owner, and he/she will pull from your fork the changes that they want.

提交回复
热议问题