flowchart LR a[make change] --> b[git add] --> c[git commit] --> d[git push]
4 Working with git
The basic git workflow looks as follows:
- Make an edit. For example in one of your chapters. Save the edit (
CNTR + S
) - Take a look whether git has recorded that you have made a change:
- Terminal:
git status
will list all the files which have been edited, but not committed.git diff YOURFILENAME
will display what content of your file has been changed.
- RStudio:
- Click the Git tab on the top right of your screen. There, you will see which files have been edited, but not committed.
- Select a file from the list in the Git tab, and click Diff to see what content of the file has been changed.
- Terminal:
- Commit the change [WIP]