Category Archives: Mac

git squash

1. Add a global “squash” alias from bash git config –global alias.squash ‘!f(){ git reset –soft HEAD~${1} && git commit –edit -m”$(git log –format=%B –reverse HEAD..HEAD@{1})”; };f’ 2. ~/.gitconfig should now contain this alias: [alias] squash = “!f(){ git reset … Continue reading

Posted in git, Mac | Tagged | Leave a comment