Git. Pushing your local branch to remote branch repo

Assume you have a git branch named experimental and you would like to push it to your remote repository.

Then just do

git push origin experimental

Now other people can see the remote branch if they do git branch -r.

Perhaps they should do a git pull first before the git branch -r.

This should come out:

origin/experimental

If they would like to work on that branch then simply

git branch <your_branch_name> origin/experimental

Don’t forget to git checkout <your_branch_name> first.

Tags: ,

No comments yet.

Leave a Reply