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
Checkout GitLab and GitHub PRs differently to improve upstream tracking.
Prior to this change, GitLab branches were not checked out in such a way
that git recorded an upstream ref to track. Since there was no tracking info,
`git pull` no longer worked. This commit updates this so the remote
branch is first fetched, and then the local branch is explicitly checked
out as tracking the remote one.
git fetch origin my-mr-branch
git checkout -b my-mr-branch origin/my-mr-branch
For GitHub, the existing method has been preserved as the namespace refs
the service makes available are read-only. Tracking isn't available
with this method.
git fetch origin pull/1337/head:pr/1337
git checkout pr/1337
I don't think GitHub makes that available (see:
https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally)
0 commit comments