Skip to content

Commit

Permalink
docs(git_blog): switch git track
Browse files Browse the repository at this point in the history
  • Loading branch information
rootCircle committed Dec 7, 2024
1 parent ea09c6b commit cc934f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/notes/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ To use a different remote branch, rather than the default one.
git switch -c branchname origin/branchname
```

To change tracking upstream for branch, use

``` bash
# Checkout to required branch
git branch --set-upstream-to=origin/branchname
```

If used once locally, from next time, one can `checkout` or `switch` to that branch only.

### GitHub Flow
Expand Down

0 comments on commit cc934f6

Please sign in to comment.