MiniGod MiniGod - 1 year ago 77
Git Question

How to push multiple branches from multiple commits?

I never used

released the Windows app, so I've never used it in command line.

So here's my situation:

I did some commits on
, then switched branch and did some commits there too. All without pushing to GitHub.
When I then clicked
in the the windows app (which I assume does
git push
), to my surprise, all my commits were pushed to my new branch - even the commits I made while I was in

Since this is the behavior of the windows app, I guess I have to use the command line.

What is the correct
git push
command to push the commits to the correct branches on the remote?

Answer Source

To push all branches (refs under refs/heads), use the following command (where origin is your remote):

git push origin --all
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download