Nachfolgende Meldung bekam ich letztes angezeigt, als ich mit git gearbeitet habe. Doch was hat es damit genau auf sich, was ist der Unterschied zwischen “matching” und “simple”?
|
|
In der Dokumentation von git steht Folgendes geschrieben (Auszug):
matching
- push all branches having the same name in both ends. This is for those who prepare all the branches into a publishable shape and then push them out with a single command. It is not appropriate for pushing into a repository shared by multiple users, since locally stalled branches will attempt a non-fast forward push if other users updated the branch. + This is currently the default, but Git 2.0 will change the default tosimple
.simple
- likeupstream
, but refuses to push if the upstream branch’s name is different from the local one. This is the safest option and is well-suited for beginners. It will become the default in Git 2.0.upstream
- push the current branch to its upstream branch (tracking
is a deprecated synonym for this). With this,git push
will update the same remote ref as the one which is merged bygit pull
, makingpush
andpull
symmetrical. Seebranch.<name>.merge
for how to configure the upstream branch.
Zusammengefasst pushed “matching” alle lokalen Branches auf die jeweiligen gleichnamigen Branches auf dem Remote.
“Simple” pushed ausschließlich den aktuellen Branch auf den Branch, der mit git pull
abgerufen wird, überprüft aber
zuvor die Namen der beiden Branches und schlägt fehl, sollten diese nicht übereinstimmen.
Dieses Verhalten wird nur dann verwendet, wenn im Befehl kein Branch genannt wird, der gepushed werden soll.