services:rcs:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
services:rcs:start [2014/12/12 10:24] – glaubitz | services:rcs:start [2014/12/12 13:19] – glaubitz | ||
---|---|---|---|
Line 5: | Line 5: | ||
Using //git//, it's relatively simple and easy to set up a shared revision control system for a group using a folder which has read and write permissions for everyone who is a member of this group. At the Physics department, we have the // | Using //git//, it's relatively simple and easy to set up a shared revision control system for a group using a folder which has read and write permissions for everyone who is a member of this group. At the Physics department, we have the // | ||
- | First of all, open a terminal and open an SSH connection to // | + | First of all, open a terminal and open an SSH connection to // |
{{: | {{: | ||
Line 11: | Line 11: | ||
This is already all that is needed to set up the shared git repository. Creating the git repository in your group' | This is already all that is needed to set up the shared git repository. Creating the git repository in your group' | ||
- | To use the newly created git repository, navigate back into your home directory using the //cd// command without any arguments. Then enter //git clone ssh:// | + | To use the newly created git repository, navigate back into your home directory using the //cd// command without any arguments. Then enter //git clone ssh:%%//%%grouphome.physik.fu-berlin.de/ |
After cloning the //myrepo// repository, change into its folder and verify it's empty using the //ls// command: | After cloning the //myrepo// repository, change into its folder and verify it's empty using the //ls// command: | ||
Line 22: | Line 22: | ||
{{: | {{: | ||
+ | |||
+ | Add the new file to the git repository by entering //git add test.txt//. You can issue //git status// again to verify the new file has now been staged for commit: | ||
{{: | {{: | ||
+ | |||
+ | To commit the changes, type //git commit -m " | ||
+ | |||
+ | **Note**: Unlike //cvs// or //svn//, anything that has been committed is not automatically pushed to the remote repository on the server (in this case, the repository in the grouphome folder). To push the changes to the remote repository, we use the command //git push//, see below. | ||
{{: | {{: | ||
+ | |||
+ | Before we push the changes to the remote repository, we can verify the changes using the command //git log// (here piped to the command //cat// to avoid displaying the git log in the //less// pager). | ||
{{: | {{: | ||
+ | |||
+ | To push the changes to the server, we use //git push//. The //push// command requires information about the remote repository to be used (called //origin// by default) as well as the development branch to be pushed to the server (//master// by default if you didn't specify any additional branches). | ||
+ | |||
+ | //git remote// lists the remote repositories that are currently available (additional can be defined using //git remote add//) while //git branch -a// lists the available branches. | ||
+ | |||
+ | Thus, in this case we need to run //git push origin master// to push our changes to the repository in the grouphome folder: | ||
{{: | {{: |
services/rcs/start.txt · Last modified: 2014/12/15 09:09 by behrmj87