User Tools

Site Tools


it:git

This is an old revision of the document!


Git Version Control System

Git (http://git-scm.com/) is a distributed version control system. It keeps a complete repository next to each working copy, thus one can commit or inspect the project history locally.

Warning: Unlike most other version control systems (e.g., Subversion) a commit is not understood as a difference between two revisions but as the content of its revision. In fact, Git stores the commit under the SHA-1 hash of all files in the project – also files that were not changed in this commit. Thus, the same change of one sub-module committed to two Git branches that differ only in another sub-module results in two different SHA-1 hashes and two different commits. It is possible to work around this by cherry-picking but that will lead to extra headache. Better practice is to have only one feature per branch.

Setup with Eclipse and GitHub

This guide is work-in-progress. I will refine the finally step while walking through with one of you.

  1. GitHub account
  2. SSH public key pair
  3. EGit
    • install “EGit - Git Team Provider” from the Eclipse Marketplace
  4. clone the repository to your computer and (add it to Eclipse
    1. in Eclipse select File → Import, then Git → Projects from Git
    2. Clone
      • URI: git@github.com:ieg-vienna/Prefuse.git
      • you don't need to change anything else!
      • leave user “git” and password “”!
    3. select a directory where Git should store local repositories
      1. this should be outside your Eclipse workspace directory!
      2. I use C:\Users\Rind\git
    4. in the “Wizard for project import” select “Import existing project”

Note: for contribution development EGit will be sufficient – you do NOT need Git for Windows

Note: I wrote this guide for Eclipse IDE for Java Developers Helios SR2, but it should also work for other versions.

Further Readings

it/git.1325760672.txt · Last modified: 2012/01/05 11:51 by Alexander Rind

alex @ ieg: home about me publications research