You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at this point, git hub creates a new branch fork/my_new_branch. But it does not set it as the tracking branch (i.e. git push -u fork my_new_branch), which means I can’t just update the branch with git push, and I always have to run git push -u fork HEAD.
I wonder if git hub could not do that automatically (at least if no other tracking branch is present).
The text was updated successfully, but these errors were encountered:
This should not happen if you have a "triangular workflow" set up (the default in the tool for quite some time now), as all pushes should go to your fork by default (git config remote.pushDefault).
Also, so far we've been driving the configuration in the opposite direction (except for the setup command, which clearly set things up). The tool will look at your config to figure out how to behave. Right now the tracking branch is even expected to point to the upstream repo, not your fork, assuming you'll use git pull to update your pull request with the current base branch changes, as it is used to infer the base branch for new pull requests.
One solution to your problem would be changing your workflow ( 😬 ) and do this instead:
My workflow is
git switch master && git pull
git switch -c my_new_branch
(orgit branch -m my_new_branch
)git hub pull new
at this point,
git hub
creates a new branchfork/my_new_branch
. But it does not set it as the tracking branch (i.e.git push -u fork my_new_branch
), which means I can’t just update the branch withgit push
, and I always have to rungit push -u fork HEAD
.I wonder if
git hub
could not do that automatically (at least if no other tracking branch is present).The text was updated successfully, but these errors were encountered: