Infographic/Poster
Question / Problem: Analysis centered on a single question/topic/problem
Common mistake: taking on too much - small and beautiful better than large and gangling.
Total [~1.5 pages of text]
And all code to reproduce the analysis [1-5 pages of code]!!
FirstDraft.docx
SecondDraft.docx
SecondDraft_advisor_comments.docx
FinalDraft.docx
FinalDraft_advisor_comments.docx
FinalDraft_advisor_comments_revised.docx
FinalDraft_advisor_comments_916.docx
FinalDraft_advisor_comments_Oct10.docx
FinalDraft_Nov2_add_figure.docx
FinalDraft_advisor_comments_Nov 13.docx
Final_final.docx
Final_final_revised.docx
Final_final_final.docx
Final_final_final_final.docx
Final_final_why_the_$*&@_did_I_come_to_grad_school.docx
Payoffs
Costs
Everything checksummed before storage and then referred by checksum.
It’s impossible to change the contents of any file or directory without Git knowing. You can’t lose information in transit or get file corruption without Git being able to detect it.
A way of reducing digital information to a unique ID:
A 40-character hexadecimal SHA-1 hash:
24b9da6552252987aa493b52f8696cd6d3b00373
Git doesn’t care about filenames, extensions, etc. It’s the information that matters…
The important stuff is hidden in the .git
folder.
Host your own server or use another private company, such as BitBucket.
Typically steps 4,5, and 6 are done at the same time.
“Please tell me who you are”.
## install if needed (do this exactly once):
## install.packages("usethis")
library(usethis)
use_git_config(
user.name = "Jane Doe",
user.email = "jane@example.org")
Git tracks all changes to files inside a repository.
Select which changed files (added, deleted, or edited) you want to commit.
Add a commit message and click commit.
push
)Click the green arrow to sync with GitHub.
*.R
scripts) and possibly very small datasets.gitignore
to ignore certain
files and filetypes*.ppt
) especially if they will change often (git has 100MB
maximum).git
or
tests
folderGit has many, many more features…
RStudio GUI has limited functionality.
$ git help <verb>
$ git <verb> --help
$ man git-<verb>
For example, you can get the manpage help for the config command by
running git help config
Similar to info in git tab in RStudio
git config
shows you all the git configuration
settings:
user.email
remote.origin.url
(e.g. to connect to GitHub)Branches used to develop features isolated from each other.
Default: master branch. Use other branches for development/collaboration and merge them back upon completion.
$ git checkout -b devel # create new branch and switch to it
$ git checkout master #switch back to master
$ git merge devel #merge in changes from devel branch
But we won’t do much with branching in this course…
Check out the (free) book ProGIT
Or the cheatsheet.
Slides adapted from Dr. Çetinkaya-Rundel and Ben Marwick’s presentation to the UW Center for Statistics and Social Sciences (12 March 2014) (OrcID)