Skip to main content

GIT Essentials

· 3 min read
Marcel Scherzer

Before you write GIT on your CV for your next job interview, make sure you know how to use GIT professionally; read on.

If you are here you know that GIT is likely the most popular version control system used in the known universe. If you are a developer looking to get paid GIT is one of your most important tools for doing a professional job.

Any developer can write code. Professional developers know how to organise code changes so that they can be easily reviewed, patched and reasoned about. GIT like other version control systems is the tool that helps us to work professionally.

Unfortunately, there is a disconnect between using GIT and using GIT Professionally.

Here, then is an insight into the GIT skills I and fellow hiring engineers expect you to possess and test for when we read the words "Skills: GIT" on your CV.

GIT basics if you are getting paid.

Know how to use the GIT from the command line.

Graphical GIT tools can be great, especially for GIT beginners, but also for professionals when resolving merge conflicts. There are plenty of fantastic dedicated git tools around such "Tower", "Source Tree" and "GitKraken"; IDEs like VSCode even ship with inbuilt GIT support with a nice integrated GUI.

Despite the attractiveness of these tools, there will be a point where you will need to drop down to the raw power afforded by the GIT command line tool. Therefore, there is an expectation that a professional GIT user has the knowledge to use GIT from the command line. Anecdotally, it has been my observation that as developers develop their GIT skills they transition away from GUI tools for all GIT tasks except the resolution of "merge" conflicts.

Use the stash to your advantage

  • Named stashes
  • Pop, Clean, List

Merge vs Rebase, clean histories.

  • Know the difference between "merge" and "rebase".
  • Ours & Theirs
  • Cherry Pick, Patches, Checkouts

Re-Organise commits so your teammates love you.

  • Use GIT to organise and create nice pull requests.
  • Squash, Rewrite
  • Re-organise with hunks.

Keep the peace, and resolve merge conflicts.

  • When do merge conflicts happen? Three-way merges?
  • Have a merge/diff tool.

GIT Warrior

  • GIT autocompletion
  • GIT aliases
  • Shell Tweaks
  • VIM & GIT, the Dream Team

Git Guru & Beyond

  • Porcelain Commands.
  • GIT Hooks
  • GIT Internals.

While not necessary, you should be capable at a pinch of using GIT from the command line to find help and resolve problems. This will inevitably be required as even the best GUI GIT Clients fall far short of the capabilities afforded by the GIT CLI.

I have noticed that developers that spend a little bit of time using GIT on the command line tend to stop using a dedicated GIT GUI. Mainly because common git operations are faster to execute from a terminal inside the IDE.