Skip to content

Commit 02a9d74

Browse files
committed
git-fetch: Add example for updating another branch
1 parent 96b56fe commit 02a9d74

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pages/common/git-fetch.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@
2626
- Deepen current shallow branch by 2 commits:
2727

2828
`git fetch --deepen 2`
29+
30+
- Update a branch (equivalent to `git pull`) without checking it out:
31+
32+
`git fetch {{origin}} {{main}}:{{main}}`

0 commit comments

Comments
 (0)