Things to try in the hands-on session or in your own time
git checkout -b <name_of_branch>
MyAnalysispackage, add some printouts, a histogram or something similar. Anything simple you have previously done in the Analysis Software Tutorial.
Commit and push the new branch
Now when you commit,
# instead of git push origin master # You will do this instead for the branch git push origin <name_of_branch>
masterbranch. You should now see a ‘Create Merge Request’ button.
Start this process and create a merge request for your branch to be merged into
master. This is a very common thing to be doing throughout your ATLAS analysis, especially if collaborating with many people on the same project. I would highly recommend getting used to this doing this often.
NOTE - The process will differ when committing and merging to the Athena repository or official ATLAS software.
Finally, you should see a screen like this
master! (Hopefully you had better commit messages than I did)
Your changes should now be in
master, feel free to switch back branches locally
One important part of ATLAS analysis is to collaborate with the analysis team, making sure all commits and changes to the analysis are communicated and added properly between collaborators. You will at some point be adding collaborators to your repository, so we can try this now.
Add a colleague or someone else from the tutorial to your project as a developer, the breakout rooms can help with this. Let us know if you can’t find anyone.
Have your partner clone your repository, create a new branch and make a small change to the code in this branch (with clear commit messages). Let them push this to the remote branch and submit a merge request to merge into
master. This will give you a chance to review the change and choose whether to accept the merge.
You may at some point have to resolve a conflict where multiple people have been working on the same piece of code locally and one or more lines conflict when trying to merge back into
Try make a new branch where you change your
MyxAODAnalysis.cxx in some way, make an eta cut on the jets or add another print out in the jet loop.
Have your partner or more people in your group create a new branch and do a similar change. If you both push and submit merge requests, you may have a conflict if you accept one merge over the other. Try the handle this conflict.
When you added your
JetSelectionHelper submodule to the your repository, the added repository is at a certain commit tag.
Try to make a change to the
JetSelectionHelper package, for example change the jet pT threshold in the
src/JetSelectionHelper.cxx. This can be done from your fork on gitlab.cern.ch because it is a small change or you can do this from the terminal.
Guides are available how to update this submodule within your working area repository, try do this for yourself but helpers will be on hand if you’re struggling.