And here are some tips I have for people learning Git.

1. Build a mental model of how Git works

One of the most important things to do when learning Git is to build an accurate mental model of how it works.

I say accurate because a lot of times when we first learn Git we adopt an inaccurate understanding of it.

Let me explain with an example.

A lot of fresh Git learners at some point start learning about branches. And from the name and the numerous colourful diagrams online it is easy to understand that branches in Git are like tree branches.

But, this is not the case!

Branches in Git are simply pointers to commits.

To see this explicitly try this exercise.

Step 1: Go to any local repository on your computer

Image for post

**Step 2: Show all the hidden files so that you can see your .git folder **(this is the folder that manages your repository). On a mac you have to hold down Cmd + Shift + . (dot). On a windows computer you will have to go into your settings to show hidden files. Then, look at the contents of the .git folder.

Image for post

#github #programming #version-control #coding #git

4 tips to learn Git (version control) from a highest-rated teacher
1.10 GEEK