Reputation: 1
I'm quite new to git and got confused with git commands. I have a project and I need to push it to an existing git repository branch. It is not the master branch but another separate branch that I have asked to work on. Please help me. Thanks!
Upvotes: 0
Views: 79
Reputation: 191
After you've created a commit, push it to a branch via:
git push <remote name> <branch name>
If you haven't added the remote repository to your current environment yet, add it via:
git remote add <remote name> <URL>
Where <remote name>
is a name you choose (conventionally "origin", referring to the remote repository as the origin of all source), and the <URL>
is the URL of the remote repository that you were given.
Upvotes: 1