|
|
|
Log as yourself:
|
|
|
|
- set up VSC
|
|
|
|
- set up bash
|
|
|
|
- set up conda env / ipython config / startup etc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
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)
|
|
|
|
7. When done for the day:
|
|
|
|
git push # push changes to GiHub
|
|
|
|
8. create pull request: on GiHub, click contribute
|
|
|
|
9. JM will review the changes; start over to step 1
|
|
|
|
|
|
|
|
|
|
|
|
Some tips:
|
|
|
|
|
|
|
|
- You can open more than one window in VSCode (I like to have a separate one for organization.md)
|
|
|
|
- To see preview of Mardown files (organization.md) side by side use extension “Auto-Open Markdown preview”
|
|
|
|
|
|
|
|
type Shift+cmd+X => this will open the extension marketplace; look for Auto-Open Markdown preview and install
|
|
|
|
|
|
|
|
- Only click once to open file from the side bar!
|
|
|
|
|
|
|
|
- You can quickly end up with too many files open; you can use ”open editor” to close / reorganize
|
|
|
|
|
|
|
|
- You can see the list of functions and variables for a given file in “outline”
|
|
|
|
- collapse to see only the functions
|
|
|
|
- Timeline shows commit messages for a given file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The letter on the side of a files indicates uncommitted changes: M = modified; D = deleted; U = untracked (only for new files)
|
|
|
|
|
|
|
|
Each commit is identified by a unique 40 characters ID called called “sha”:
|
|
|
|
|
|
|
|
typically only the first 6 to 8 character are displayed; this is a good way to check where you are
|
|
|
|
|
|
|
|
To see the list of branch: git branch
|
|
|
|
more info: https://www.atlassian.com/git/tutorials/using-branches
|
|
|
|
|
|
|
|
You might be able to create new branches and switch from one to another using the bottom icon; I haven’t played with it though:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\ No newline at end of file |