git & git-lfs
Overview
Git is a version control system, which allows you to keep old versions of files and directories (usually source code), keep a log of who, when, and why changes occurred, etc.,
Versions 2.23.0 (via a modulefile) and 1.8.3.1 (system-wide default) are installed on the CSF. We recommend using the newer version via the modulefile.
git-lfs Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.
Version 2.11.0 (via a modulefile) is available on the CSF.
If you require a different version to the one installed we advise that you install it in your home directory.
Restrictions on use
All users of the system can access the software.
Set up procedure
We recommend using the newer version via the modulefile rather than the system-wide default. Hence you should load the modulefile:
module load proxy module load git # Can also give the version explicitly: git/2.23.0-gcccore-8.3.0
To use git-lfs use:
module load git-lfs
The proxy modulefile allows access to external websites and repositories.
Note that if you get an error such as:
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/.../refs
Then you are using the older system-wide default version and should load the above modulefile instead.
Running the application
On the command line type git
.
If you wish to prepare a repository for use with git-lfs run the following inside each repository:
git lfs install
External Access
If using the default system-wide version of git (1.8.3.1) and you need to access git servers/repositories which are off campus please add the following to your environment:
module load proxy
You should then be able to run git commands such as:
git clone https://github.com/myproject.git myproj
Please note that git over ssh://
or git://
protocols is not supported on the CSF.
Don’t clone in to scratch
We strongly recommend that you clone repositories in to you home area, or other research data storage, instead of your scratch area. This is because the scratch clean-up policy can automatically delete files older than 3 months. A cloned repository often contains many very old files.
Further info
- On the login node run:
git help
- http://git-scm.com/
Updates
None