Six Useful Git Tips

I feel pretty safe saying that the version control wars are over and that Git has won. To be sure, there’s Subversion and a couple of other distributed version control systems whose names nobody can recall but mostly it’s Git. After Emacs converted to Git, it was pretty clear that the rear guard actions had failed and Git had prevailed.

Of course, git has a reputation for being opaque and even though systems like Magit help at lot, it’s easy for a newcomer to Git—or even a more experienced but naive user—to become confused regarding its proper usage.

James Turnbull has a useful post that contains six tips to help you become a more proficient Git user. If you’re still a little shaky on proper Git usage, it’s definitely worthwhile taking a look at his post.

I don’t want to repeat his content but I will list the six things he considers:

  1. Use of the reset command.
  2. Using cherry picking to package up the last commit for application to other branches.
  3. Amending a commit.
  4. Using stashing to temporarily save away some work in progress so that you can switch branches without having to commit.
  5. How to leverage the full power of the log command.
  6. Using the powerful bisect command to locate the commit containing code that’s causing an error.

Turnbull’s post is reasonably short and well worth a few minutes of your time.

This entry was posted in General and tagged , . Bookmark the permalink.