Suppose I just created a local branch b
.
When I do git push
it pushes changes from other branches according to matching (git 1.x default):
push all branches having the same name on both ends. This makes the repository you are pushing to remember the set of branches that will be pushed out (e.g. if you always push maint and master there and no other branches, the repository you push to will have these two branches, and your local maint and master will be pushed there).
However, if the current branch doesn't exist on the remote yet, it will not push the current branch. git push --all
seems to do this. Is there a way to make this behavior default for git push
? Are there any bad side-effects to aliasing push=push --all
?
Edit: actually I only want it to push matching + current branch (including new), excluding other new branches