User Tools

Site Tools


services:rcs:start

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
services:rcs:start [2014/12/12 13:38] – Changed code to monospace font behrmj87services:rcs:start [2014/12/12 13:50] – added switch --shared to git init, this helps users of shared repos to not shoot themselved in the foot behrmj87
Line 7: Line 7:
 ==== Creating the shared git repository on the server ==== ==== Creating the shared git repository on the server ====
  
-First of all, open a terminal and open an SSH connection to //login.physik.fu-berlin.de//. Then change into your group's grouphome directory using the //cd// command, e.g. ''cd /net/grouphome/ag-test''. Then issue the command ''git init --bare myrepo.git'' to create an empty git repository with the name //myrepo//:+First of all, open a terminal and open an SSH connection to //login.physik.fu-berlin.de//. Then change into your group's grouphome directory using the //cd// command, e.g. ''cd /net/grouphome/ag-test''. Then issue the command ''git init --bare myrepo.git --shared=true'' to create an empty git repository with the name //myrepo//:
  
 {{:services:rcs:git-grouphome-step1.png|}} {{:services:rcs:git-grouphome-step1.png|}}
Line 56: Line 56:
  
 ==== Collaborating with other users ==== ==== Collaborating with other users ====
 +
 +This section shall demonstrate how a second user would clone the repository from the server, make changes, commit them and eventually push them back to the repository.
 +
 +To simulate this scenario in this example, we just create a new empty folder called //repo2// where we clone a second local working copy into. This is basically the same as if a second user clones the remote repository into their home directory.
 +
 +To clone the remote repository we just created, it's best practice to specify the remote repository using the full hostname of the server (servername + domain) as well as the full path on the server (as opposed to using ''/net/grouphome/ag-test/myrepo.git''). This way, ''git'' will automatically set the proper ''remote'' entry which allows future pushes to the repository to be more convenient.
 +
 +After cloning, we change into the //myrepo// directory of the repository and verify the commit history using the already known ''git log'' command:
  
 {{:services:rcs:git-grouphome-step8.png|}} {{:services:rcs:git-grouphome-step8.png|}}
services/rcs/start.txt · Last modified: 2014/12/15 09:09 by behrmj87

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki