Skip to content

Instantly share code, notes, and snippets.

@lnfnunes
Last active March 24, 2018 20:00
Show Gist options
  • Save lnfnunes/882c3be1bfb46eee8c06 to your computer and use it in GitHub Desktop.
Save lnfnunes/882c3be1bfb46eee8c06 to your computer and use it in GitHub Desktop.
Git commands

Temove all local branches not on remote

git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D

Configure merge tool (meld)

git config --global merge.tool meld git config --global mergetool.meld.trustExitCode false // Fix git mergetool meld --help error git config mergetool.meld.hasOutput true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment