Update cheatsheets

This commit is contained in:
ivuorinen
2025-03-08 00:14:59 +00:00
parent a812b3c467
commit f8bee5305f
111 changed files with 540 additions and 310 deletions

View File

@@ -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}}`