Linux Hacking‎ > ‎

Git Push New Branch to Remote


So you want to create a new branch so you can make some changes and push it to your public repo for everyone to see.  Creating the new branch is easy enough, but when you do a normal git push, nothing happens.  How do you push your new branch as well?  With a little searching, here's what I found.

git checkout -b foo 
git push git@github.com:bitflippersanonymous/Flippy.git foo:foo

git push, location to push to, remote branch name : your branch name

So, your one repository could have branches that push to different remote repositories.  Neat huh.



Comments