wiki:InstallGuides/InstallGit

Git Install and Setup Guide

This page is to learn about what Git is and get it installed and set up. If you are looking for instructions on how to use git and setup a chaste repository, please see ChasteGuides/GitGuide!

What is a Git repository?

  • A git repository is a collection of commits arranged in a sequential or branching network
  • Each commit contains snapshots of the files that are added, along with timing, author etc. information
  • As well as the commits, branch pointers show the progress of different branches
  • The working directory is simply the current set of files in the user's local directory
  • The staging area is where new edits are added in preparation for creating a new commit

Before you let yourself loose in the depths of Chaste and git, you might like to read some of this Git Guide.

Install Guide

Debian-based distributions (i.e. Ubuntu)

$ apt-get install git

On older Ubuntu distributions you get an older version of Git which may be incompatible with the Chaste Git repository:

 $ git push
error: RPC failed; result=22, HTTP code = 401
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
$ git --version
git version 1.7.9.5

If you see the above error, then you will need to get a newer Git, like so:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update 
sudo apt-get upgrade git

Fedora

$ yum install git

Mac

Windows

Git Configuration

Setup your git installation by telling it your name and email, if you make these the same as your github credentials you'll get credit on there for Chaste commits.

$ git config --global user.name "Firstname Lastname"
$ git config --global user.email "example@maths.ox.ac.uk"

Other handy settings:

$ git config --global credential.https://chaste.cs.ox.ac.uk.username your-username
$ git config --global core.commentchar ";"
$ git config --global pull.ff only

The last one is equivalent to passing --ff-only to every git pull.

Git plugin for eclipse

See InstallGuides/EclipsePlugins

Last modified 4 years ago Last modified on Nov 3, 2016, 10:29:51 AM