User Tools

Site Tools


computing:git

This is an old revision of the document!


CMSSW and github

SVN switcher guide

cms-uzh repository at CERN

Cloning the repository

There are two ways to clone the repository:

git clone https://:@git.cern.ch/kerberos/cms-uzh #With valid kerberos credentials
git clone https://git.cern.ch/reps/cms-uzh #LDAP authentication

Web access to the repository

CERN Knowledge Base on git service

Private copy of a repository and pull requests

Instead of directly pulling and pushing changes to a project repository, it is much safer to work on a private copy (called fork) on the github server and transfer changes only via pull request from the privat repository to the project repository on the server.

1. Go to https://github.com/cms-edbr/ExoDiBosonResonances and click on “Fork” and choose you user area on github.

2. Clone code from your private copy of the repository

git clone git@github.com:ahinzmann/ExoDiBosonResonances

This command will also give this repository the name “origin”.

3. Make an alias to the main repository

git remote add cms-edbr git@github.com:cms-edbr/ExoDiBosonResonances

4. Pull latest changes in branch edbr_tautau from the main repository

git pull cms-edbr edbr_tautau

5. Make local changes, add these files for a commit and commit

git add some_modified_file
git status
git commit -m"message"

6. Push changes in edbr_tautau branch to you private repository on github server

git push origin edbr_tautau

7. Got to you private respository https://github.com/ahinzmann/ExoDiBosonResonances and make a pull request to move your changes to the project repository by clicking on “Pull Request”, “New Pull Request”, “Edit”, and select the edbr_tautau branch in both repositories. You may have to click on “Edit” twice to do so.

computing/git.1387375310.txt.gz · Last modified: 2013/12/18 15:01 by hinzmann