git branch -r
to list remote branches.git checkout --track -b <local-branch> <remote>/<branch>
to check your branch out.
Because I know I’ll forget it if I don’t write it down now.
I’ve been doing a thing in a branch on one machine, but now I want to do that thing on another machine. I’ve already pushed that branch to origin, so I don’t need to - hold on. I better put that down as well.
On One Machine
The main concern here is to ensure that my work isn’t stuck on the one machine. The -u
flag (or --set-upstream
for the verbose) creates a tracking reference upstream, so that the remote repository remembers the branch.
On Another Machine
Now that I’ve created the tracking reference upstream, I can pull it down from the other machine.
Hope I didn’t forget anything. I’ll find out soon enough.
Backlinks
Added to vault 2024-01-15. Updated on 2024-02-01