Git – failed to push some refs

Wenn Git eine Fehlermeldung ausgibt, die dieser ähnelt:

Push: failed to push some refs to ’ssh://gituser@angelcode.de:22/~/repos/primatrainer-android.git‘ refusing to update checked out branch: refs/heads/master. By default, updating the current branch in a non-bare repository is denied, because it will make the index and work tree inconsistent with what you pushed, and will require ‚git reset –hard‘ to match the work tree to HEAD. You can set ‚receive.denyCurrentBranch‘ configuration variable to ‚ignore‘ or ‚warn‘ in the remote repository to allow pushing into its current branch; however, this is not recommended unless you arranged to update its work tree to match what you pushed in some other way. To squelch this message and still keep the default behaviour, set ‚receive.denyCurrentBranch‘ configuration variable to ‚refuse‘.

Dann hilft folgender Handgriff:

  1. Am Terminal anmelden
  2. Ins betroffene Git-Repository wechseln
  3. Die Zeile git config receive.denycurrentbranch ignore eingeben

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.