mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-23 12:18:51 +02:00
When pushing a branch that didn't have an upstream yet, we use the command line git push --set-upstream origin HEAD:branch-name The HEAD: part of this is too unspecific; when checking out a different branch while the push is still running, then git will set the upstream branch on the newly checked out branch, not the branch that was being pushed. This might be considered a bug in git; you might expect that it resolves HEAD at the beginning of the operation, and uses the result at the end. But we can easily work around this by explicitly supplying the real branch name instead of HEAD.