Happy git with R a bookdown site from Jenny Bryan. Particularly useful are
- Connect RStudio to git and github
- chapters 15-17 on projects (I generally go down the route of chapter 16)
Learning git branching is a nice interactive tool for learning git
OH MY GIT! game for learning git
git clone path-to-your-forked-repo
git remote ctu path-to-ctu-main-repo
git pull https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git BRANCH_NAME
git commit -i * -m 'merge with upstream master'
Ref:
https://help.github.com/en/articles/merging-an-upstream-repository-into-your-fork
https://stackoverflow.com/questions/5827944/git-error-on-commit-after-merge-fatal-cannot-do-a-partial-commit-during-a-mer
You can also define a remote...
# only necessary once
git remote REMOTE_NAME https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
# pull via
git pull REMOTE_NAME BRANCH_NAME
...which normally automatically merges and commits.
E.g. if you've created a branch while not being connected to the internet...
git push origin develop
Ref:
https://www.git-tower.com/learn/git/commands/git-push
Could be useful...
Ref:
https://www.hostinger.com/tutorials/how-to-rename-a-git-branch/
git branch -d BRANCHNAME
from here, which also shows how to delete a remote branch
A repo cannot be simultaneously private and public, just one or the other. It is possible to use GH actions to sync content. The action can be found here. Note that you need to modify the repository path on line 23. The file may also need some cleaning up for spaces...