By  Colten Rouska


  • (2002) Linux kernel managed with BitKeeper
  • (2005) BitKeeper became unavailable and Git was born


Made For:

  • Speed
  • Simplicity
  • Fully distributed
  • Handle Large projects easily (Linux kernel)
  • Non-linear development (thousands of parallel branches)

Inner Workings

Which is Git and which is like other version control systems?

Inner Workings

  • Git doesn't keep track of file changes over time.
  • Keeps a snapshot (mini file system) and stores a reference

Inner Workings

Do you require an internet connection to use Git?
No. To clone and push a repository you may need an internet connection.

Where is the Git history stored  Server or Locally?
Git history  is stored on every device that has the Git repository. (Locally)

Distributed Workflows

Git has a complex branching system. With it you can have multiple types of workflows.

Staging Area

The space between a modified file and a commit

Creating a Repository

Initializing (Fresh start)
root@Machine ~/myRepo
$ git initInitialized empty Git repository in /home/myRepo/.git/

Cloning (Existing Repository)
root@Machine ~/myRepo$ git clone myUsername@MyAwesomeRepo/myAwesomeProject.git


root@Machine ~/myRepo$ git status
# On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # modified file: File1.txt # new file: MyAwesomeFile.txt
$ git status -s  M  File1.txt  A  MyAwesomeFile.txt

Adding Files

git add usage: git add [options] [--] <file-pattern>
-n, --dry-run          # run without executing and verbose results-p, --patch            # specify chunks of a file-A, --all              # add everything and skip stage
$ git add *.sh
$ git add .


Short hand:
root@Machine ~/myRepo$ git commit -m "Some Message Here"

Long hand:
root@Machine ~/myRepo$ git commit
< Type your message here ># Please enter the commit message for your changes...# Changes will be committed: ...# ...~~

Patching Files

root@Machine ~/myRepo $ git add -p
y - Yes add this hunkn - No don't add this hunkd - No don't add and skip remaining hunkss - Split the hunk into smaller hunkse - Manually edit the hunk


Commit message
$ git commit --amend -m "My new message"
Insert forgotten files
$ git commit --amend -C HEAD


$ git branch <Branch Name>$ git checkout <Branch Name>
Create and Checkout
$ git checkout -b <Branch Name>
Push to Server
$ git push origin <Branch Name>
Push with hooks
$ git push -u <remote> <branch>


In what situation would you use these?

Rebasing from the remote repository:
$ git pull --rebase
Rebasing from master:
$ git rebase master


$ git bisect start
$ git bisect bad
$ git bisect good [v1.0 ...]
$ git bisect reset
$ git bisect start HEAD v1.0
$ git bisect run bake       # Hopefully the list is short


Merge Tools
Git logs / Commit history


A monster on its own
$ git merge --commit / --no-commit / -m   # commit the merge or not for inspection--edit / -e                   # edit the auto generated merge message--strategy / -s <something>   # implement your own merging strategy--abort                       # revert merge if conflicts arise

Merge Tool


Git History

$ git log
commit c63h23354nfgj3945hrjfgj4hb43bh345Author: Awesome Bub <>Date: Thu Feb 30 08:14:55 2014 -0700 My Commit Message. #Bug-958
commit ...


$ gitk --[all] &--max-count=<number>--since=<date>--until=<date>

Generally Good Practices

  • Branch Prune Repeat
    • Major changes
    • Features
    • Experiments
  • Be granular with commits
    • Commit often
    • Be specific
  • Keep up to date with the project repository
    • The left behind sheep gets eaten



By Colten Rouska (Rizowski)


A presentation on Git. What is it? Why is it the chosen VCS? How can you use it?

  • 889