alskdjlkasdf
git clone <URL>: downloads the repo to current directory
git branch <NAME>: create branchgit branch -a: list all branchesgit branch -d <NAME>: deletegit branch -D <NAME>: force delete
git switch <NAME>: switch togit checkout <NAME>: "older" way to switch branches
git switch -c <NAME>: create and switch to branch 1 commandgit checkout -b <NAME>same using checkout
- Also see branch delete above
git log --oneline --graph --all: show you git historygit fetch --prune: clean up your git history
You won't know it's going to happen until it does.
git rebase <BRANCH>: e.g., will update current branch
-
Software Carpentry notes on basic git: https://swcarpentry.github.io/git-novice/
- The setting up git has the commands to setup your name/email/editor: https://swcarpentry.github.io/git-novice/02-setup/index.html
-
Git workflow notes and commands (to paste on your wall)
-
Atlassian page on git workflows: https://www.atlassian.com/git/tutorials/comparing-workflows
- The one we covered today was mainly the "Feature Branch Workflow": https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow
-
The atlassian page has more infor about "git flow", but this is also another top Google hit that I liked:
-
Getting your (bash) terminal to show current path and other things:
- Use this to create your PS1 variable: http://bashrcgenerator.com/
-
Show git branch in terminal:
- In addition you can write a function and put that in your PS1 to also show git branch
- https://gist.github.com/joseluisq/1e96c54fa4e1e5647940
-
Video I did with more forking related workflow: https://www.youtube.com/watch?v=uvWhSYBkZJ0
-
Setting up ssh links: https://bi-sdal.github.io/training/ssh-keys.html
-
https://happygitwithr.com/ (more rstudio specific workflows)