Read First

ReferenceLink
Learn Git Branchinghttps://learngitbranching.js.org/
Atlassian’s guide on Workflowshttps://www.atlassian.com/git/tutorials/comparing-workflows

Starting out with Git

The first thing you need to know before moving forward is the Git terminology, there is no going around this. You will hear words such as commit, branch, merge, pull request and the likes, and you need to know what that means and what they are referring to. Unfortunately, most guides will go quickly into a terminal and show you git commands. This might already be confusing if you only want to learn the core concepts and idea and are planning to use a GUI Git software like GitKraken or GitHub Desktop. There has to be another way, right?

Well, yes and no. The main reason why the use of terminal commands is so common when first learning Git is because the Git terminology is the git commands. So the best way to learn the terminology of Git is by doing Git… In terminal… Without any help… Daunting, right? Fret not!

Start here, it’s like a game 🥳

Learn Git Branching

And complete at least the following lessons before moving forward

  • Introduction Sequence
    1. Introduction to Git Commits
    2. Branching in Git
    3. Merging in Git
    4. Rebase introduction
  • Ramping Up
    1. Detach yo’ HEAD
    2. Relative Refs (^)
    3. Relative Refs (~)
  • Remote : Push & Pull — Git Remotes!
    1. Clone Intro

Git in the Real World

Now that you are starting to learn the termonology and have gone through some growing pain, it’s time to releave a bit of the pressure and take a step back. The truth is that you not need to use Git in the terminal. Although it can be easier to fix problems in teminal, there are a bunch of softwares that provide you with a Graphical User Interface for git. To name but a few,

Info

My favorite GUI software for git is by far GitKraken. No other software has the features that I require except this one… And believe me, I looked… GitKraken is proprietary and has a monthly license fee business model… I HATE that.

There is a free tier, but you can’t work on private repo with that license which make it essentially useless…

Nevertheless, it is what I recommend.

- Guillaume

GitKraken for Students

If you are a student, you can get a FREE GitKraken Pro license through the

Setting up GitKraken

First Launch

In the video, I am hiding the “PRO” tag that I mention… Your GitKraken’s bottom-right corner should look like this,

Adding Integrations and SSH Keys

Creating a Repo

Changes, Commits and Branches

Git Tracks ANY changes

Git is NOT limited to text files such as code files, you can 100% track changes to binary files such as office suite files (.doc, .docx, .ppt, .odf, .pdf…), images (.png, .jpeg, .tiff, …), …

The only thing to keep in mind in that case is that you will not be able to see the details of the changes that took place. You will see that the entire file was changed.

Git has limits

Although you can track changes from any files, binary files are usually completely rewritten between versions. If they are of a large size (a few MBs or more), you should consider using Git LFS.

Merges and Rebase

More info

Atlassian : Merging vs. rebasing GitKraken Client Documentation : Branching and Merging

Local and Remote

Stashes

Workflows

Now that we have seen how to use the tool itself (git) to manage a repository, we have to learn how to work with it in the context of a project with collaborators. These recipes for how to actually work with git in a project are called Git workflows and give guidelines for many of the choices you have to make, such as

  • How many branches do you use?
  • How should you name them?
  • What should they be used for?
  • How do you avoid conflicts (conflicts between files, not people…)?
  • How do you resolve them when they arise?
  • How often should you make a build/release?
  • How (in what branch) should you work on
    • Bugfixes
    • New features
    • Experimental changes

A great reference to start learning git workflows is the Atlassian Learn Git tutorials, specifically the Comparing Git workflows article.