diff options
author | Guangxiong Lin <[email protected]> | 2022-09-14 14:40:19 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-09-14 14:40:19 +0800 |
commit | 7b90b441242910aca721e3cbf19370cdb5e25954 (patch) | |
tree | ad279b87b7404922e6f4a5c3f6d2964477683e80 /git | |
parent | 2cb5e8288f9135aef85d657710e6be1823376600 (diff) | |
download | cheatsheet-7b90b441242910aca721e3cbf19370cdb5e25954.tar.gz cheatsheet-7b90b441242910aca721e3cbf19370cdb5e25954.tar.bz2 cheatsheet-7b90b441242910aca721e3cbf19370cdb5e25954.zip |
More git cheatsheet
Diffstat (limited to 'git')
-rw-r--r-- | git | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -6,6 +6,12 @@ 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 |