/ / Git:他のブランチの背後でコミットが停止-git、ブランチ、コミット、プル、背後

Git:コミットは他のブランチの後ろに止まっています - git、branch、commit、pull、behind

「最近、独自のブランチシステムを採用しました。Gitですが、最近イライラしていることの1つは、あるブランチで変更をコミットしようとすると、Gitは別のブランチがリモートブランチの背後にあるためコミットを停止することです。したがって、それぞれにチェックアウトする必要があります元のブランチに戻ってコミットする前に、変更されたブランチを最初にプルします。

他のブランチが原因でGitがコミットを停止できないようにする設定はありますか?ブランチを切り替える必要を防ぐことができる特定のアプローチがありますか?

回答:

回答№1は0

試してください:

git config --global push.default current

エラーメッセージの種類を回避する必要があります ここで述べた

error: failed to push some refs to "git@github.com:jkubicek/my_proj.git"
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you did not intend to push that branch, you may want to
hint: specify branches to push or set the "push.default" configuration
hint: variable to "current" or "upstream" to push only the current branch