|
|
|
Log as yourself:
|
|
|
|
___
|
|
|
|
___
|
|
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
|
|
___
|
|
|
|
___
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Where to work
|
|
|
|
|
|
|
|
Always login as yourself (beamline or personal computer):
|
|
|
|
- set up VSC
|
|
|
|
- set up bash
|
|
|
|
- set up conda env / ipython config / startup etc
|
|
|
|
- clone repo to a local folder
|
|
|
|
- do not work in the working directory!
|
|
|
|
|
|
|
|
working directory = current working version of beamline code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
## Workflow for code development
|
|
|
|
|
|
|
|
1. git checkout main # switch to “main” branch
|
|
|
|
2. git fetch # check for changes of main repository
|
|
|
|
3. git merge origin/main # update your “main” branch to include changes from the day before
|
|
|
|
3. git pull # update your “main” branch to include changes from the day before
|
|
|
|
4. git checkout -b branchX # create new branch from “main” named branchX and switch to it
|
|
|
|
5. make changes
|
|
|
|
6. commit changes regularly:
|
|
|
|
- stage (plus sign) (use curved arrow to undo changes)
|
|
|
|
- enter message
|
|
|
|
- commit (checkmark)
|
|
|
|
6. commit changes regularly; think atomique commit (vs big all together commit):
|
|
|
|
|
|
|
|
7. When done for the day:
|
|
|
|
git push # push changes to GiHub
|
|
|
|
8. create pull request: on GiHub, click contribute
|
| ... | ... | |