Skip to content

Commit

Permalink
Update check_out_remote_branch.md
Browse files Browse the repository at this point in the history
  • Loading branch information
williln authored Aug 23, 2024
1 parent 23a9cf9 commit 86462ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git/check_out_remote_branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ A colleague has opened a PR. I want to check out their branch on my own machine
**Assumptions**: You have the repo checked out and set up locally on your machine. You work on it regularly.

- Get the branch name that you want
- Back in your terminal, run `git fetch` to load all the remote branch
- Back in your terminal, get thee to wherever you have this repo
- I always check out `main` and update it at this point, just to be fresh
- Now run `git fetch` to load all the remote branches
- Then run `git checkout <branch-name>`

You are now in a new branch on your local machine that is a copy of the branch at the remote.
Expand Down

0 comments on commit 86462ff

Please sign in to comment.