Back to Course
Using Git and GitHub with R
0% Complete
0/0 Steps
-
Welcome, Logistics, Course Materials, and Additional Resources
-
Introduction to Git and GitHubWhat is Git? What is GitHub?
-
Why Should You Learn to Use Git and GitHub?
-
Update Everything
-
GitInstall Git
-
Configure Git
-
Create a Local Git Repository
-
Commits
-
Commit History
-
GitHubGitHub Repositories
-
Connect RStudio and GitHub
-
Push an RStudio Project to a GitHub Repository
-
Pull a GitHub Repository to an RStudio Project
-
Keep RStudio and GitHub in Sync
-
Collaborating with Git and GitHubWhy Use GitHub vs Dropbox, Google Drive, Box, etc?
-
Dealing with Common Problems: Can't Pull Code from GitHub
-
Dealing with Common Problems: Merge Conflicts
-
Dealing with Common Problems: Can't Push Code to GitHub
-
Let's Keep Bad Things from Happening in the First Place
-
BranchesWhat are Branches and Why Should We Use Them?
-
Branch Names
-
How to Create Branches
-
Using Pull Requests to Merge a Branch Into Main
-
Project Management with GitHubGitHub Issues
-
How to Organize Issues
-
Wrapping UpOther Cool Stuff You Can Do with GitHub
Lesson 9 of 26
In Progress
Commit History
Your Turn
- Add some additional text to your README.md
- Commit your changes (make sure to stage your README.md file and add a commit message)
- View the history of your repository
- Make sure you understand the commit history (top section) and the diff (bottom section)
- View your README.md at a previous commit by clicking on “View file …”
Have any questions? Put them below and we will help you out!
You must be logged in to post a comment.
Hi David, for some reason when I create the README file and then change/add the text and hit ‘commit’ again, my README file isn’t there to stage. I’ve tried deleting the local-first project, creating a new one and starting over, and I get the same issue.
Can you try editing the README file a bit (just add some random text) and see if it shows up then?
I did try, and I saw it and was able to hit commit and ‘stage’ it with a comment. But later when I wanted to add more text and hit commit again to continue testing it out, it was gone again from being able to stage.
Are you sure that you saved your file before hitting commit? It will only show files ready to be staged that have already been saved.
Thanks, David! Once I hit save that seemed to fix it.
Hi David! I’m getting an error when I try to run a commit. I was able to do it previously but today it’s not working. I have restarted R and gone through Configure Git, Create a Local Git Repository, and Commits again and am still having the same error.
“On branch master
Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git restore …” to discard changes in working directory)
modified: README.md
Untracked files:
(use “git add …” to include in what will be committed)
setting-up-github.Rmd
no changes added to commit (use “git add” and/or “git commit -a”)”
2 Questions:
1) What should I do with this error?
2) I noticed that I saved the .md file before committing, and have run at least 3-4 commits, but will only see the original file I uploaded and the most recent commit, not any of the commits in between. How can I make the interim commits display too?
I got to Office Hours with Charlie – I forgot to tick the box next to the “README” file I was trying to stage 🙂 All good now but posting in case anyone else is having this issue too.
Glad you got it figured out!