Git basics

Git it!

Git? What?

Git is a version control system that is widely used for software development and other version control tasks. It is a distributed revision control system with an emphasis on speed, data integrity and support for distributed, non-linear workflows. Git was initially designed and developed in 2005 by Linux kernel developers (including Linus Torvalds) for Linux kernel development.

Source: https://en.wikipedia.org/wiki/Git_%28software%29

Version Controlling

Version control systems are basically a way of storing information about changes in code. They keep track of every modification to the code, including the person responsible for it and precise time.

Additional information about version control can be found here: https://www.atlassian.com/git/tutorials/what-is-version-control/benefits-of-version-control

Watch how it works

Git Tutorial for Beginners: Command-Line Fundamentals

You can chek out this guide as well: http://rogerdudler.github.io/git-guide/

(you don’t need the parts related to branching in the Prog Basics module)

Learn by doing

Please do sections 1-5 here:

https://www.katacoda.com/courses/git

You can access help for a given git command by adding --help (for example git init --help)

This might be helpful as well during the course: http://lmgtfy.com/?q=How+to+exit+the+Vim+editor%3F

Because most of the times we are not creating, but cloning (downloading) a repository, read about cloning here: https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository

Gitignore

To exclude some file types from version control, you can create a .gitignore file (note the dot in the beginning of the filename) to list what you want to leave out from all future commits. With Python, it is recommended to use the content of this file, as a .gitignore file: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore

Extra lecture

You can listen why git was created, and how it works (deep inside) by it’s main creator, Linus Torvalds: