3 ms·
After learning about fixup and squash commits, I started typing `git rebase -i --autosquash` so frequently that I made an alias for it. It has totally changed t
by dljsjr 5y ago
After learning about fixup and squash commits, I started typing `git rebase -i --autosquash` so frequently that I made an alias for it. It has totally changed the way that I work. You get to have the best of both worlds; commit early, commit often but then also having nice and tidy PR's and histories.
- okl 5y agoMy aliases: alias.c commit alias.cf commit --fixup alias.cm commit --message alias.co checkout alias.f fetch -v -p alias.par pull --rebase --autostash alias.ri rebase --interactive --autosquash --autostash alias.rim rebase --interactive --autosquash --autostash master alias.s status alias.l !git --no-pager log --oneline -n10 alias.pf push --force-with-lease alias.bs !git --no-pager diff --stat master..HEAD alias.p push alias.alias !git --no-pager config --get-regexp alias Sometimes I get the feeling that my job isn't programming but managing text snippets (diffs).
- evanrelf 5y agoYou can also enable auto-squash by default: git config --global rebase.autoSquash true