User Tools

Site Tools


computing:git

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
computing:git [2013/12/18 15:34] – [Private copy of a repository and pull requests] clangecomputing:git [2017/03/04 15:20] (current) – [CMSSW and github] iwn
Line 1: Line 1:
 ====== CMSSW and github ====== ====== CMSSW and github ======
- 
   * [[http://cms-sw.github.io/cmssw/faq.html|CMSSW github FAQ]]   * [[http://cms-sw.github.io/cmssw/faq.html|CMSSW github FAQ]]
   * [[https://help.github.com/articles/how-do-i-add-a-collaborator|How to add collaborators]]   * [[https://help.github.com/articles/how-do-i-add-a-collaborator|How to add collaborators]]
   * [[http://git-scm.com/book|Git Book]]   * [[http://git-scm.com/book|Git Book]]
 +  * [[https://education.github.com/git-cheat-sheet-education.pdf|Git Cheat Sheet]]
   * [[https://indico.cern.ch/conferenceDisplay.py?confId=286055|Git tutorial]]   * [[https://indico.cern.ch/conferenceDisplay.py?confId=286055|Git tutorial]]
   * [[computing:git:basics|Basic git commands to work with CMSSW]]   * [[computing:git:basics|Basic git commands to work with CMSSW]]
Line 45: Line 45:
 echo "Your github username has been set to \"$GITUSER\"" echo "Your github username has been set to \"$GITUSER\""
 git clone git@github.com:$GITUSER/ExoDiBosonResonances git clone git@github.com:$GITUSER/ExoDiBosonResonances
 +cd ExoDiBosonResonances
 </code> </code>
  
Line 59: Line 60:
   git remote -v   git remote -v
  
-4. Fetch latest changes in branch edbr_tautau from the main repository+4. Update to the edbr_tautau branch (this will move the HEAD):
  
-<code> 
-git pull cms-edbr edbr_tautau 
-</code> 
- 
-and update HEAD to branch: 
   git co edbr_tautau   git co edbr_tautau
 +
 +Fetch latest changes in branch edbr_tautau from the main repository
 +
 +  git fetch cms-edbr edbr_tautau
 +
 +and merge
 +
 +  git merge edbr_tautau cms-edbr/edbr_tautau
 +  git merge FETCH_HEAD origin/master #generally
 +
 +To preview what this would do you can try
 +
 +  git log ..cms-edbr/edbr_tautau
 +  git diff ...cms-edbr/edbr_tautau #used to be FETCH_HEAD
  
 5. Make local changes, add these files for a commit and commit 5. Make local changes, add these files for a commit and commit
Line 80: Line 90:
 <code> <code>
 git push origin edbr_tautau git push origin edbr_tautau
 +git push origin master #generally
 </code> </code>
  
Line 85: Line 96:
 https://github.com/GITUSER/ExoDiBosonResonances https://github.com/GITUSER/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. You may either ask someone else to "Merge" this pull request or do it by yourself if you have the rights and are confident. 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. You may either ask someone else to "Merge" this pull request or do it by yourself if you have the rights and are confident.
- 
computing/git.1387377256.txt.gz · Last modified: 2013/12/18 15:34 by clange