Skip to content

Instantly share code, notes, and snippets.

@AurelienLoyer
Created September 13, 2021 15:01
Show Gist options
  • Save AurelienLoyer/3b267f755bb62a1d618ebcc938e89537 to your computer and use it in GitHub Desktop.
Save AurelienLoyer/3b267f755bb62a1d618ebcc938e89537 to your computer and use it in GitHub Desktop.
Git alias
s = status -s
dammit = !BRANCH=$(git rev-parse --abbrev-ref HEAD) \
&& git fetch origin $BRANCH \
&& git reset --hard origin/$BRANCH
find-branch = !sh -c \"git branch -a | grep -v remotes | grep $1 | head -n 1 | xargs git checkout\"
pushf = push --force-with-lease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment