Skip to content

Instantly share code, notes, and snippets.

Avatar

Abhishek Thorat abhishekthorat-tudip

  • Tudip Technologies pvt ltd
  • Pune
View GitHub Profile
@abhishekthorat-tudip
abhishekthorat-tudip / gist:149d51eb2f7d75b27b2129a998f6bf09
Last active Nov 14, 2017
git Track your base branch/parent branch
View gist:149d51eb2f7d75b27b2129a998f6bf09
git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'
View git-author-rewrite.sh
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then