The special refspec : (or +: to allow non-fast-forwardupdates) directs git to push “matching” branches: for every branch that exists on the local side, the remote side isupdated if a branch of the same name already exists on the remote side. ... so all other branches were pushed unintentionally :(
Whats the default behavior?"By default, git push origin will update branches on thedestination with one with the same name on the source,instead of using the association defined by git branch--track, which git pull origin would use — the config optionpush.default can change this behaviour.” http://longair.net/blog/2011/02/27/an-asymmetry-between-git-pull-and-git-push/
git config push.default● nothing● matching (default)● upstream● currentIntroduced 4 years ago in commit:https://github.com/git/git/commit/521537476fe99b97bfcdf1b8f0c579061af5fd3e
What should be by default?● simple (not default)"push to the upstream branch, but only if it has the same name remotely. Ifnot, give an error that suggests the right command to push explicitely toupstream or current."Introduced in commit: http://goo.gl/je6gkAvailable since 1.7.11 (https://raw.github.com/git/git/master/Documentation/RelNotes/1.7.11.txt)Ubuntu:[00:33:03] mgrzechocinski ~ git versiongit version 18.104.22.168
git push -u● set tracking branch● set push branch$ git push origin -u topic/feature1Total 0 (delta 0), reused 0 (delta 0)To firstname.lastname@example.org:mgrzechocinski/gitkata.git * [new branch] topic/feature1 -> topic/feature1Branch topic/feature1 set up to track remote branchtopic/feature1 from origin by rebasing.$ git pushCurrent branch topic/feature1 is up to date.$ git pullCurrent branch topic/feature1 is up to date.