Skip to content

Instantly share code, notes, and snippets.

@sannithibalaji
Last active May 12, 2020 16:49
Show Gist options
  • Save sannithibalaji/198babb8c1829449ce41137efbf70909 to your computer and use it in GitHub Desktop.
Save sannithibalaji/198babb8c1829449ce41137efbf70909 to your computer and use it in GitHub Desktop.
my personal snippets
delete_all_local_branches:
git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -d
set upstream with push
git push --set-upstream remote branch
update submoduels
git submodule update --init --recursive
pull all code in submodules as well
git pull --recurse-submodules
rename branch
git branch -m <newname>
see contents of stash without applying them
git stash show -p stash@{0}
%y+ copy all lines to clipboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment