
Git
From sselab
(→FAQ) |
(→Wrong Committer Name: changed --global zu --local + typo) |
||
(5 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
[[File:git.png|right|300px|caption]] | [[File:git.png|right|300px|caption]] | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
== Git == | == Git == | ||
Line 37: | Line 16: | ||
===FAQ=== | ===FAQ=== | ||
====Fetch URL for project==== | ====Fetch URL for project==== | ||
- | You have activated the Git service and want to clone your remote repository. If your | + | You have activated the Git service and want to clone your remote repository. If your project name is ''musterproject'', go to the overview of your project (https://sselab.de/lab1/user/project/musterproject/) and click on the Git service. |
- | + | [[File:Git-Screenshot2.jpg|center|frame|80px|Project Overview]] | |
You will be redirected to the web view of your remote git repository: | You will be redirected to the web view of your remote git repository: | ||
* '''<nowiki>https://sselab.de/lab2/private/git/musterproject/</nowiki>'''gitweb.cgi?p=musterproject | * '''<nowiki>https://sselab.de/lab2/private/git/musterproject/</nowiki>'''gitweb.cgi?p=musterproject | ||
- | Your | + | Your repository URL will then be: |
* '''<nowiki>https://sselab.de/lab2/private/git/musterproject/</nowiki>''' | * '''<nowiki>https://sselab.de/lab2/private/git/musterproject/</nowiki>''' | ||
- | |||
====Wrong Committer Name==== | ====Wrong Committer Name==== | ||
Line 50: | Line 28: | ||
Wrong Committer name, please change it before you push! | Wrong Committer name, please change it before you push! | ||
* This is due our feature '''committer validation during push'''. You have not set your username of your local git environment to your sselab username. They have to be the same as your account values (username of sselab and email address set in the sselab). | * This is due our feature '''committer validation during push'''. You have not set your username of your local git environment to your sselab username. They have to be the same as your account values (username of sselab and email address set in the sselab). | ||
- | * After you changed your username and email address of your local environment, you have to change this values also in each commit of | + | * After you changed your username and email address of your local environment, you have to change this values also in each commit of your local repository. [https://www.kernel.org/pub/software/scm/git/docs/git-config.html Git Config Man Page] |
# Set username and email | # Set username and email | ||
- | git config -- | + | git config --local user.name "mustermann" |
- | git config -- | + | git config --local user.email "mustermann@test.com" |
# Reset author of all commits in local repository | # Reset author of all commits in local repository | ||
git commit --amend --reset-author | git commit --amend --reset-author | ||
+ | |||
+ | ====First steps in project==== | ||
+ | First you cone the empty repository of the project. (see: [[Git#Fetch URL for project]]) | ||
+ | git clone <Repository-URL> | ||
+ | |||
+ | Configure you git environment. (see: [[Git#Wrong Committer Name]]) | ||
+ | git config --global user.name "mustermann" | ||
+ | git config --global user.email "mustermann@test.com" | ||
+ | |||
+ | Create your project structure and add all new files to version control. | ||
+ | git add . | ||
+ | Commit your changes to your local repository. | ||
+ | git commit -m initial | ||
+ | Push you changes from you ''master'' branch into the ''origin'' project repository. | ||
+ | git push origin master | ||
===Links=== | ===Links=== | ||
Line 66: | Line 59: | ||
[[git_first-steps | First Steps]] | [[git_first-steps | First Steps]] | ||
+ | |||
+ | === Features=== | ||
+ | At the moment the current features are available: | ||
+ | * web-based viewing of your repository (via gitweb) | ||
+ | * email notification upon commit to all project members | ||
+ | * committer validation during push (username of the sselab account) | ||
+ | |||
+ | === Changelog === | ||
+ | * 2012-11-15: | ||
+ | ** removal of remote branches is now possible | ||
+ | ** improved email messages (Subject changed) | ||
+ | ** better error message for failed push operations | ||
+ | ** Service is now activated. The private beta phase is ended. | ||
+ | * 2012-02-27 | ||
+ | ** Inital release | ||
+ | ** Only private beta phase | ||
+ | |||
== Send feedback to extend this description== | == Send feedback to extend this description== | ||
Please contact us if you have question concerning the usage of the service. We are also curious about new ideas for additional services and new usage scenarios. [https://sselab.de/lab1/user/messages/send/ Send us a message over the contact form] or [mailto:admin@sselab.de?subject=Service%20Git write us an email] | Please contact us if you have question concerning the usage of the service. We are also curious about new ideas for additional services and new usage scenarios. [https://sselab.de/lab1/user/messages/send/ Send us a message over the contact form] or [mailto:admin@sselab.de?subject=Service%20Git write us an email] |
Current revision as of 10:02, 24 November 2014
Contents |
Git
Description
Git is a distributed version control system.
Aim
Git is used for version control of files, much like tools such as Subversion. Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do.
Workflow
FAQ
Fetch URL for project
You have activated the Git service and want to clone your remote repository. If your project name is musterproject, go to the overview of your project (https://sselab.de/lab1/user/project/musterproject/) and click on the Git service.
You will be redirected to the web view of your remote git repository:
- https://sselab.de/lab2/private/git/musterproject/gitweb.cgi?p=musterproject
Your repository URL will then be:
- https://sselab.de/lab2/private/git/musterproject/
Wrong Committer Name
If I try to push my changes to the remote repository, I get the error message:
Wrong Committer name, please change it before you push!
- This is due our feature committer validation during push. You have not set your username of your local git environment to your sselab username. They have to be the same as your account values (username of sselab and email address set in the sselab).
- After you changed your username and email address of your local environment, you have to change this values also in each commit of your local repository. Git Config Man Page
# Set username and email git config --local user.name "mustermann" git config --local user.email "mustermann@test.com" # Reset author of all commits in local repository git commit --amend --reset-author
First steps in project
First you cone the empty repository of the project. (see: Git#Fetch URL for project)
git clone <Repository-URL>
Configure you git environment. (see: Git#Wrong Committer Name)
git config --global user.name "mustermann" git config --global user.email "mustermann@test.com"
Create your project structure and add all new files to version control.
git add .
Commit your changes to your local repository.
git commit -m initial
Push you changes from you master branch into the origin project repository.
git push origin master
Links
Features
At the moment the current features are available:
- web-based viewing of your repository (via gitweb)
- email notification upon commit to all project members
- committer validation during push (username of the sselab account)
Changelog
- 2012-11-15:
- removal of remote branches is now possible
- improved email messages (Subject changed)
- better error message for failed push operations
- Service is now activated. The private beta phase is ended.
- 2012-02-27
- Inital release
- Only private beta phase
Send feedback to extend this description
Please contact us if you have question concerning the usage of the service. We are also curious about new ideas for additional services and new usage scenarios. Send us a message over the contact form or write us an email
- This page was last modified on 24 November 2014, at 10:02.
- This page has been accessed 100,045 times.