Git 101

By
Steven Morrison
April 13, 2021

Git is an unbelievably useful tool for version control. It is used to keep a backup of your work that you can revert to if needed. Working with git you are able to make branches of your work. A branch is an independent line of development used when working on any new features, doing bug fixes, or just when doing things to the project that you don’t want to affect any working code.

I first used Git during my time at university like many I would guess, and I continue using it today – however, like everything there are always commands I forget, and while there’s already a lot of documentation out there on all the aspects of Git including branches, I don’t want to search for the commands across the internet each time I forget how to branch, so I have made a list of my most commonly used commands.

Name and move to new branch.

Git checkout -b New Branch name

Add new/modified files and commit.

Git commit -a -m “commit Message”

Push changes.

Git push origin branch name

Change branch.

Git checkout Branch name

Merge one branch in another branch.

Git checkout Branch Name
Git merge Name of branch to merge with

That’s all for now hope this helps you out and if your memory is anything like mine I’m sure it will.

Steven

Image of Steven Morrison with the OptimalBI logo in the background.

Steven Morrison is a design innovation grad who’s part of the team here at OptimalBI, so you’ll find him squirreling away working on stuff that helps make us look good. 

Connect with Steven on LinkedIn, or read some of his other blogs here.

Copyright © 2019 OptimalBI LTD.