... | ... | @@ -30,11 +30,33 @@ There is a aliases to activate the current environment for the command line, ipy |
|
|
|
|
|
### Debugging the working version of the code
|
|
|
- navigate to the local repo (see above)
|
|
|
- git status (to see what the current status of the code local vs remote repos and decide if you need to commit)
|
|
|
- git pull (to get the latest version of the code from the remote repo)
|
|
|
|
|
|
- find out the current state of things.
|
|
|
```
|
|
|
git status # to ch
|
|
|
git diff # to ch
|
|
|
```
|
|
|
|
|
|
- if things need to be committed
|
|
|
```
|
|
|
git add . # add all modified files for committing
|
|
|
git commit -m "message about what changed"
|
|
|
```
|
|
|
- get any changes from the remote repo
|
|
|
```
|
|
|
git fetch # check for changes of main repository
|
|
|
git pull # update your “main” branch to sync to remote repository
|
|
|
|
|
|
```
|
|
|
|
|
|
- make your changes with your favorite editor
|
|
|
- git commit .
|
|
|
- git pus
|
|
|
|
|
|
- commit and push to the remote repo
|
|
|
```
|
|
|
git add . # add all modified files for committing
|
|
|
git commit -m "message about what changed"
|
|
|
git push # pushes the changes to the remote repo
|
|
|
```
|
|
|
|
|
|
---------------------------------------
|
|
|
## Workflow for code development
|
... | ... | @@ -56,7 +78,7 @@ Login as yourself (beamline or personal computer): |
|
|
|
|
|
### Make your changes
|
|
|
|
|
|
Commit changes regularly; think atomique commits (commit files one by one vs big all-together combined commit):
|
|
|
Commit changes regularly; commit files one by one vs big all-together combined commit makes tracking down issues easier
|
|
|
|
|
|
```
|
|
|
1. git status # check status to see a list of the files with changes
|
... | ... | @@ -77,9 +99,8 @@ or, from VSCode: |
|
|
```
|
|
|
git push # push changes to GitLab
|
|
|
```
|
|
|
Then, from GitLab or VSCode:
|
|
|
- create pull request for your branch
|
|
|
- JM will review the changes and merge into main as needed.
|
|
|
|
|
|
Changes from your branch can be merged with the main branch on the machine studies day
|
|
|
|
|
|
---------------------------------------
|
|
|
|
... | ... | |