= SFB 1102 Git Repository = This document describes the shared Git repository for members of the Sonderforschungsbereich 1102 "Information Density and Linguistic Encoding". If you are looking for the shared data storage, please see [[SFB1102-Storage|here.]] == When to use Git and when to use the SFB Storage == * The [[http://wiki.coli.uni-saarland.de/public/SFB1102-Storage|SFB Storage]] is used for storing large (collections of) static files, e.g. corpora. * The Git repository is used for files that need versioning, e.g. reserach papers, grant proposals, or program code. * Usually, large files should be stored in the SFB storage, small files may be stored in the Git repository, as the VM space the Git repository is running on is an order of magnitude more expensive than the SFB storage. * As a rule of thumb, "small" files are counted in Megabytes, "large" files are counted in Gigabytes. == Git server / GitLab == . '''https://git.sfb1102.uni-saarland.de''' * Please create an account using your *.uni-saarland.de email address. * If you do not have a *.uni-saarland.de email address, or if you wish to invite external project partners to access the Git repository, please contact your [[SFB1102-LocalContact|local contact person]] to request an account be created for you. * While creating a new project you may import an existing one via "Import project from" -> "Any repo by URL". If you do import an existing project, you may wish to inform all members of that project to commit their current changes before import. * A project can be "Private", "Internal" or "Public". * For private projects access must be granted for every user by the project owner. * Internal projects are accessible by any user who has a valid account. Please be aware that anybody owning a UdS email address may create an account. * Public projects are accessible by anybody worldwide. * Please find a more detailed description of !GitLab functionality [[https://www.digitalocean.com/community/tutorials/how-to-use-the-gitlab-user-interface-to-manage-projects|here.]] == Accessing a repository == === Via Graphical User Interfaces === * You may use the built in commands "git gui" or "gitk". * There exist a plethora of graphical user interfaces to access Git repositories. You may find a selection here: https://git-scm.com/downloads/guis === Via Simple Commands === * You may find a short introduction (in German) about Git commands here: https://rogerdudler.github.io/git-guide/index.de.html * The following is a list of useful commands for a repository named "testrepo" * Git global setup {{{git config --global user.name "John Doe"}}} {{{git config --global user.email "johndoe@sfb1102.uni-saarland.de"}}} * Clone an existing repository to your local hard drive {{{git clone git@git.sfb1102.uni-saarland.de:root/testrepo.git}}} {{{cd testrepo}}} {{{touch README.txt}}} {{{git add README.txt}}} {{{git commit -a}}} {{{git push -u origin master}}} * Add an Existing folder or Git repository {{{cd existing_folder}}} {{{git init}}} {{{git remote add origin git@git.sfb1102.uni-saarland.de:root/testrepo.git}}} {{{git add .}}} {{{git commit}}} {{{git push -u origin master}}} == SSH-Key == To make command line access much more comfortable you may wish to upload your SSH public key to your "Profile Settings" -> SSH Keys". == FAQ == * Please direct all questions to your [[SFB1102-LocalContact|local contact person.]] * To understand the ideas behind distributed revisioning systems you may wish to watch Linus Torvalds' [[https://www.youtube.com/watch?v=4XpnKHJAok8|talk on Git]]. * More to be added here in due time.