Skip to content

Instantly share code, notes, and snippets.

@Asilo5
Last active March 24, 2019 21:40
Show Gist options
  • Save Asilo5/5431e340ce7d2d29086c10c6ed9eb309 to your computer and use it in GitHub Desktop.
Save Asilo5/5431e340ce7d2d29086c10c6ed9eb309 to your computer and use it in GitHub Desktop.

Beginners Guide to Git

And how not to loose your mind

So, you have decided to learn about Git? Have a bootcamp or a job that requires it or just trying to be cool?

You came to the right place! Git is at the end not that tough, really, at least the beginning part.

Here I'll explain to you a bit about what I know about Git 🔥

Git is a version control system, its a program that allows you to make changes to your project over time or allow you to go back to the original version.

Git also tracks the changes done over time, making it easy to see what changes have been made.

Before you start:

  1. Make sure you have created a directory that you want git to follow
  2. You can also create the files inside the directory, but if you fancy adding them in once you started git it is no biggie

First off, you have to tell git what to follow 👀

Git won't just follow any old directory without you saying which.

So once you are inside the directory you want git to follow, you simply have to enter on the terminal:

$ git init

Once you see a message that says its initilised, gits got you!

Check the status of your progress with..

$ git status

This just gives you a picture of where you are in your git journey

Add your file

$ git add followed by the file name you have modified adds the file to the staging area.

Commit your changes

$ git commit -m followed by the message in quotation marks takes a snapshot of the work you have done.

  • You only need to use 'Initial commit' on the first commit you make
  • Afterwards, you can just keep your messages short but clear about what you have done/changed

See the changes you have made

$ git diff followed by the file you want to check allows you to see the changes you have done so far


Knowledge is of no value unless you put it into practice.

  • You are gonna do great!

Thumbs up gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment