Skip to content

Instantly share code, notes, and snippets.

@jvcleave
Last active February 24, 2023 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jvcleave/4760707 to your computer and use it in GitHub Desktop.
Save jvcleave/4760707 to your computer and use it in GitHub Desktop.
git cheatsheet
//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