mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-27 11:53:28 +00:00
Update cheatsheets
This commit is contained in:
@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all branches (local and remote; the current branch is highlighted by `*`):
|
||||
|
||||
`git branch --all`
|
||||
`git branch {{[-a|--all]}}`
|
||||
|
||||
- List which branches include a specific Git commit in their history:
|
||||
|
||||
`git branch --all --contains {{commit_hash}}`
|
||||
`git branch {{[-a|--all]}} --contains {{commit_hash}}`
|
||||
|
||||
- Show the name of the current branch:
|
||||
|
||||
@@ -30,12 +30,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Rename a branch (you must switch to a different branch before doing this):
|
||||
|
||||
`git branch {{-m|--move}} {{old_branch_name}} {{new_branch_name}}`
|
||||
`git branch {{[-m|--move]}} {{old_branch_name}} {{new_branch_name}}`
|
||||
|
||||
- Delete a local branch (you must switch to a different branch before doing this):
|
||||
|
||||
`git branch {{-d|--delete}} {{branch_name}}`
|
||||
`git branch {{[-d|--delete]}} {{branch_name}}`
|
||||
|
||||
- Delete a remote branch:
|
||||
|
||||
`git push {{remote_name}} --delete {{remote_branch_name}}`
|
||||
`git push {{remote_name}} {{[-d|--delete]}} {{remote_branch_name}}`
|
||||
|
||||
Reference in New Issue
Block a user