Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7046d73

Browse files
authoredApr 14, 2025··
Update git-branch.md
Added example of how to create a branch and switch to it automatically!
1 parent 9c8d43e commit 7046d73

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎pages/common/git-branch.md

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323

2424
`git branch {{branch_name}} {{commit_hash}}`
2525

26+
- Create new branch and switch to it:
27+
28+
`git branch -b {{branch_name}}`
29+
2630
- Rename a branch (you must switch to a different branch before doing this):
2731

2832
`git branch {{[-m|--move]}} {{old_branch_name}} {{new_branch_name}}`

0 commit comments

Comments
 (0)
Please sign in to comment.