Mastering on Github

If you use Git each and every single day, this post might be helpful for you. I write this post for my personal preference as well.

Push commit to another Branch

If you are on a development team where there is more than 1 developer, you might need your personal branch to update your work. In this case, you need to know how to push the commit to another branch.

You need to specify the source ref and the target ref:

git push origin branch1:branch2


git push <remote> <branch with new changes>:<branch you are pushing to>