aboutsummaryrefslogtreecommitdiff
path: root/git
blob: 8b9cf0a6d0aac363773fa83c97c21aa0f04583b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
syntax: bash
tags: [ vcs ]
---

# Show contents of a file
git show revision:path/to/file

# Recover a file
git restore --source=<commit or branch> path/to/file

# Find which branches contain a specific commit
git branch --contains <commit hash>

# Run commands in all existing commit
git filter-branch --tree-filter 'shell command' HEAD

# Show branches and their commits
git show-branch