Skip to content

Instantly share code, notes, and snippets.

@jsheridanwells
Last active May 23, 2018 13:28
Show Gist options
  • Save jsheridanwells/ff91ee64c98b3af9b9c244c4a2abc58f to your computer and use it in GitHub Desktop.
Save jsheridanwells/ff91ee64c98b3af9b9c244c4a2abc58f to your computer and use it in GitHub Desktop.
Git Tricks

Git Tricks

Set any fetched branch to track the remote, fetch and pull:

git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all

(Here...)

Dry Run: https://coderwall.com/p/8dyicg/dry-run-in-git

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