23
Mar
2019

search lost info

23 Mar 2019
git reflog --all | grep something git fsck --full --no-reflogs --unreachable --lost-found | grep commit | cut -d\ -f3 | xargs -n 1 git log -n 1 --pretty=oneline > .git/lost-found.txt
26
Feb
2018

List git branches that can safely be deleted

26 Feb 2018
git branch --no-merged git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
13
Mar
2017

Git snippets

13 Mar 2017
git config receive.denycurrentbranch ignore vi .git/hooks/post-receive #!/bin/bash cd ../ env -i git reset --hard chmod +x .git/hooks/post-receive git diff --name-status SHA1 SHA2 | cut -f2