Introduction to Git

What is Git?

  • "Open Source Distributed Version Control System"
  • Created by Linus Torvalds
  • It's an instrument that allows us to manage our code and  the history of its changes

What is GitHub?

  • Web service from where we can access Git repositories
  • Controlled access to repository by multiple people (contributors) with a nice UI over it
  • Gives us a lot more tools like PR-s, Wikis, etc.

You can use Git without GitHub!

What is the difference?

Let's create our first repository!

What is a "commit"?

Local and Remote

Know the difference:

  1. git add
  2. git commit
  3. git push
  • git init <directory>
  • git clone <repo> <directory>
  • git config --global user.name <name>
  • git config --system core.editor <editor>
  • git add <file> | <directory> | -p | -A
  • git commit -a | -m 
  • git fetch <remote>
  • git branch -r
  • git push | origin <branch_name>
  • git pull | origin <branch_name>
  • git checkout <branch_name>
  • git merge <branch_name>

Cheat sheet

Introduction to Git

By Hack Bulgaria

Introduction to Git

Programming 101 with Python / week 6 / 01.04.2019

  • 1,067