Version Control

The SORCER Project uses Git for version control. Git 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 by Linus Torvalds for Linux kernel development in 2005, and has since become the most widely adopted version control system for software development.

Git supports rapid branching and merging, and includes specific tools for visualizing and navigating a non-linear development history. A core assumption in Git is that a change will be merged more often than it is written, as it is passed around various reviewers. Branches in git are very lightweight: A branch in git is only a reference to a single commit. With its parental commits, the full branch structure can be constructed.

Some data flows and storage levels in the Git revision control system.

Check out the Git Cheat Sheet

Basic Git Workflow

  1. Checkout a repository
    git clone username@host:/path/to/repository
  2. Add and Commit
    You can propose changes (add it to the Index) using
    git add
    or
    git add *
    This is the first step in the basic git workflow. To actually commit these changes use
    git commit -m "Commit message"
    Now the file is committed to the HEAD, but not in your remote repository yet.

  3. Pushing Changes
    Your changes are now in the HEAD of your local working copy. To send those changes to your remote repository, execute
    git push origin master
    Change master to whatever branch you want to push your changes to.

  4. Update
    To update your local repository to the newest commit, execute
    git pull
  5. Merge
    To merge another branch into your active branch (e.g. master), use
    git merge <branch>
    Git tries to auto-merge changes. Unfortunately, this is not always possible and results in conflicts. You are responsible to merge those conflicts manually by editing the files shown by git. After changing, you need to mark them as merged with
    git add <filename>

Back to top

Version: 1.0-SNAPSHOT. Last Published: 2020-01-18.