Code for projects in UC Berkeley UG Astronomy Radio Labratory.
If for some reason there is a failure of git pull and you get a "Merge Conflict" error then run "nbdime merge-web" in terminal this will open a web page showing your version on left and other version on right and you can select which to save.
Infrastructure for Git: Inside bash: (ideally use Git Bash or Anaconda Prompt)
- pip install nbdime nbstripout
- nbdime config-git --enable --global
- nbstripout --install --global
- git clone https://github.com/USERNAME/radiolab2026-Cal.git
- git checkout YOUR BRANCH NAME
- git branch -> tells you which branch you're in (please only work within your branch, pushes to main from pi will be done as a group)
Working with Git:
- git branch -> double check you're in your own branch
- git pull (iff there is a push to main then do git pull origin main)
- edit code and add files
- git add . -> adds all changes to your push
- git commit -m "update info"
- git push
specific Instructions for Git push and pull:
- "git add (notebookname).ipynb" will add changes -> think of it like putting items into a box before mailing it. You can select which files to be part of this particular update (say 3 files out of 10 in the github).
- "git commit -m "Updated analysis"" takes everything currently in the box from the add function and seals it permanently asa snapshot in the local history. the part following the "-m" is a message for the update so you know what you did with this particular box. THIS WILL CLEAN THE NOTEBOOK so when you commit the NBSTRIPOUT tool makes sure the version getting saved has not graphs or output, just pure code
- "git push" sends updated files and code to the github
- "git pull" pulls the most recent files from the github