Skip to content

Instantly share code, notes, and snippets.

@JessePreiner
Created September 5, 2018 19:51
Show Gist options
  • Save JessePreiner/eaa48ab953242fe42f8c7d2d8c8ad7f2 to your computer and use it in GitHub Desktop.
Save JessePreiner/eaa48ab953242fe42f8c7d2d8c8ad7f2 to your computer and use it in GitHub Desktop.
Git snippits
Find common ansestor commit between multiple branches from which to create a hotfix/feature branch
git checkout -b fixExtractor $(git merge-base --octopus origin/master origin/develop)
Git delete untracked new files
git status -s | awk '{if($1=="??") print $2}' | xargs rm -rf
Delete branches matching pattern
git branch | grep thisisthepattern | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment