Introduction - seljukgulcan/git-notes GitHub Wiki

History of Version Control Systems

  1. Local Version Control Systems: Everything is local. Versions are stored as changes.

  2. Centralized Version Control System: Repository is on the server. Main problem is that if server is down than everybody waits for it. (SVN)

  3. Distributed Version Control System: Git. Everybody keeps a copy of whole repository. Every changes, every branches stored both locally and on remote server.

History of Git

Developed by Linus Torvalds while developing Linux kernel.

Goals of git:

  • Speed
  • Simple design
  • Strong support for non-linear development (thousands of parallel branches)
  • Fully distributed
  • Able to handle large projects like the Linux kernel efficiently (speed and data size)

Basics

Main workflow: Main Workflow

Git Setup

Git configuration is stored in three different places: One for system level, one for user level and one for repository specific. git config is the tool to change these config variables.

$ git config --global user.name "John Doe"

$ git config --global user.email [email protected]

--global tag makes config to be used in all system.

core.editor config sets default editor used when some extra information is needed running git commands (such as git commit without -m)

git config --global core.editor "subl -n -w" sets current editor as sublime text.

git config --list for listing every config variable.

Help

$ git help <verb>

$ git <verb> --help

⚠️ **GitHub.com Fallback** ⚠️