Skip to content

Comment on My Git Workflowparent

Comments

If someone else is lazy like me, you can put the following in your ~/.gitconfig

  [alias]
      magic = rebase -i HEAD~10
Then you can just use 'git magic' instead of writing the full command.

Just keep in mind that it hardcodes the operation to the last ten generations of commits, which is not necessarily what you want. See "SPECIFYING REVISIONS" in the man page for git-rev-parse (http://www.kernel.org/pub/software/scm/git/docs/v1.6.1/git-r...) for all the different ways you can format the HEAD~10 part.

Then again, I have an alias "git cia" for "commit -a"... Just remember where to look it up if you need something more elaborate.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.