Reputation: 14171
I want to push a branch (not the current) without having to check it out first, how can I achieve that ?
this is how I'd do:
#currently in master
git checkout feature
git push origin feature
git checkout master
but checking out feature can cause conflicts, can't I just push another branch than the current one ?
Upvotes: 161
Views: 32043
Reputation: 122458
Simply:
git push origin feature:feature
Or shorter:
git push origin feature
Upvotes: 243