Last active
February 24, 2023 22:24
-
-
Save jvcleave/4760707 to your computer and use it in GitHub Desktop.
git cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//git remove missing files | |
git rm $(git ls-files --deleted) | |
//replace master with goodbranch | |
git checkout goodbranch | |
git merge -s ours master | |
git checkout master | |
git merge goodbranch | |
git commit -am "add all and commit" | |
git archive --format zip --output ../filename.zip master | |
//ignore file system changes | |
git config core.filemode false | |
#ignores | |
example*/bin/data | |
example*/bin/libs/ | |
example*/bin/* | |
!example*/bin/data/.gitkeep | |
//restore deleted file | |
git checkout HEAD^ OMXAudioDecoder.cpp | |
//remove any unstaged changes | |
git clean -df & git checkout . | |
//NON-GIT | |
//determine lib architecture | |
lipo -info opencv.a | |
REGEX | |
Any string to extension | |
.*(?=\.) | |
Any letter | |
[a-zA-Z]+ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment