SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
teaching:lectures:alp:2017:infrastructure_git [2017/03/13 15:51]
Günter Kniesel created
teaching:lectures:alp:2017:infrastructure_git [2018/05/09 01:59] (current)
Line 1: Line 1:
 +
 +====== Git ======
 +You will collaborate with the members of your exercise group and submit your exercise results via [[https://​www.atlassian.com/​git/​|Git]]. \\
 +
 +[[https://​www.atlassian.com/​git/​|Git]] is the version control system that you will also be expected to know when you will have finished your master'​s degree. So better make sure you get to know it as soon as possible and use every opportunity to really master it! It will be one of the '​selling points'​ when you will apply for a job. 
 +
 +
 +<​note>​
 +
 +If you never heard about Git read [[https://​www.atlassian.com/​git/​|Atlassian'​s Git tutorial]] ​
 +/* 
 +and attend the "Git Crash Course"​ on **Wednesday,​ April 13, 2016, at 16:15** in Room A207 <- //The ALP lecture room//​. ​
 +
 +**Bring your laptop and make sure you have a working internet connection.**
 +*/
 +</​note>​
 +
 +==== Git Clients ====
 +
 +As Git client you may use anything you like, for instance ​
 +  * [[http://​www.syntevo.com| SmartGit]] -- **recommended,​ used in the lecture and exercises**. SmartGit is a graphical interface for an underlying command-line based git implementation. It automatically installs a Git implementation suitable for your operating system. **Make sure to choose "​non-commercial licence"​ when you install SmartGit!!!**
 +  * [[https://​www.eclipse.org/​egit/​|EGit]] -- very conveninent if you use Eclipse anyway but not as nice to use as SmartGite. eGit can be installed simply by dragging the following icon to your running Eclipse: <​html><​a href="​http://​marketplace.eclipse.org/​marketplace-client-intro?​mpc_install=1336"​ title="​Drag and drop into a running Eclipse Indigo workspace to install EGit - Git Team Provider">​
 +  <img src="​http://​marketplace.eclipse.org/​sites/​all/​modules/​custom/​marketplace/​images/​installbutton.png"/>​
 +</​a></​html>​ . Egit includes jGit as underlying Git implementation.
 +  * the GitBash command-line ​ -- if you prefer full control rather than ease of use. See WWW for implementations suitable for your operating system. ​
 +
 +
 +==== Getting Access to the Git Server ====
 +
 +To get access to our research group'​s Git server, you need to send us a public ssh key. This section tell you how to create it.
 +
 +=== Tools ===
 +Linux has open-ssh installed. ​
 +
 +In Windows, an open-ssh version comes with [[http://​git-scm.com/​download/​win|Git for Windows]], which is automatically installed as part of the installation of SmartGit. You find "​git-bash.bat"​ in the git installation folder or, more easily, via the "Open Git-shell"​ command in the context-menu of SmartGit.  ​
 +
 +=== Steps ===
 +Type the following on a command prompt (no matter whether you are on Linux or on a git-bash shell in Windows):
 +
 +<​Code>​ssh-keygen</​Code>​
 +
 +When you are asked for a filename enter **your first and second name** ​ in the form (all lower case)
 +
 +<​Code>​firstname.secondname</​Code>​
 +
 +When you are asked for a passphrase enter a password of your choice or don't enter anything (just hit <​RETURN>​) -- is is up to you whether you want the double security of a key with password or just the key. It depends on how sure you are that nobody will get your private key.
 +
 +This creates two key files 
 +  * firstname.secondname.''​pub''​ <- the public key that you send us (see below)
 +  * firstname.secondname <- the private key that you **never** share with anybody. You need to load it at your first connection to our Git server.
 +
 +You find the generated keys eihter
 +  * in your home directory (Linux) or 
 +  * in the "​.ssh"​ folder of your user folder (Windows), or 
 +  * in the folder in which you invoked the ssh-keygen command.
 +
 +<​note>​
 +
 +Make sure you send us  **only the public** key! ;-)
 +
 +Keep the private key private -- don't let anyone have it!!!
 +</​note>​
 +
 +==== Git Repositories for Your Assignments ====
 +
 +For **assignment 0** there is a public Git repository hosted at 
 +
 +  ssh://​git-se@git.iai.uni-bonn.de/​alpYYYY_shared
 +  ​
 +<- Please replace ''​YYYY''​ in the URL by the current year!
 +
 +To access it, download {{..:​2016:​alp.anonymous.txt|this private key file}} and **store it without the "​.txt"​ extension!!!** Then use it in your Git client when accessing the above URL.
 +
 +For **all other assignments** each exercise group will get a private Git repository at 
 +
 +  ssh://​gitolite-se-alp@git.iai.uni-bonn.de/​alp_group_NN ​
 +  ​
 +(where NN is the number of your group). For the groups 1 to 9 just enter two digit, e.g. alp2016_group_01. ​
 +
 +
 +==== Cloninig a Repository ==== 
 +
 +To [[http://​git-scm.com/​docs/​git-clone|git clone]] a repository use either the Git Bash command
 + 
 +  <​Code>​$ git clone ONE_OF_THE_GIT_REPOSITORY_URLS_FROM_ABOVE </​Code> ​
 +
 +or add the repository URL into the dialog for the "​clone"​ command in your visual git client (here is a screenshot for SmartGit):
 +
 +{{:​teaching:​lectures:​alp:​clon3.jpg?​600}}
 +
 +=== Interesting Links ===
 +  * [[https://​www.atlassian.com/​git/​|Git tutorial by Atlassian]] is a good starting point for reading more about Git. 
 +  * [[http://​git-scm.com/​book/​en/​v2| The Git Book]] is kind of the official Git reference.
 +  * [[http://​git-scm.com/​documentation|Git tutorials]],​ including a crash course for SVN users. ​
 +  * [[http://​gitref.org/​|The official Git Reference]].
 +  * An interesting presentation on Git can be found on [[https://​www.youtube.com/​watch?​v=4xpnkhjaok8|Youtube]]. Linus Torvalds explains there the advantages and benefits of Git and distributed SCMs in general. ​
 +  * Why **cherry picking**? The answer can be found [[http://​technosophos.com/​2009/​12/​04/​git-cherry-picking-move-small-code-patches-across-branches.html|here]],​ among others.
 +
 +
 +
  

SEWiki, © 2019