This is a simple howto explaining how to add or edit files in "iLCSoft/lcgeo using command line git instructions.
First, we create a fork of "iLCSoft/lcgeo"  by clicking the 'Fork' button on the top right corner:
Then, in the popup dialog, we click the avatar to create protopopescu/lcgeo. ⚠️ If the fork is already there, make sure it's up to date, else you will have to rebase it and it's not possible from within the browser. 
 The title in the top left will now say
Then we go back to a terminal and do:
cd lcgeo/
git branch -vv
We now move to my fork of "iLCSoft/lcgeo", called "protopopescu/lcgeo”. ⚠️ If the fork was already there, make sure it's up to date, else this won’t work.
 
Now, we create a new branch, which we call "SiD_edits"
git checkout -b SiD_edits
 
We edit some file
 
cd SiD/compact/SiD_o2_v03
emacs materials.xml
then we 'save' (=add+commit+push) the changes
git add materials.xml 
git commit -m"Updated materials list"
git push downstream SiD_edits
And we are now ready for creating a pull request. Back to the browser, we notice at the top right a ‘Compare & pull request button
We click it and we are presented with
We click the green button, add our comments and release notes, and thenclick the 'Create pull request’ button:
The pull request will be reviewed and eventually be approved. Once the pull request is approved, the code will go into the iLCSoft/lcgeo master, and we can now even delete the branch
git branch -d SiD_edits
  • No labels