Get access to all lessons in this course.
-
Introduction to Git and GitHub
- What is Git? What is GitHub?
- Why Should You Learn to Use Git and GitHub?
- Update Everything
-
Git
- Install Git
- Configure Git
- Create a Local Git Repository
- Commits
- Commit History
-
GitHub
- GitHub 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 GitHub
- Why 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
-
Branches
- What 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 GitHub
- GitHub Issues
- How to Organize Issues
-
Wrapping Up
- Other Cool Stuff You Can Do with GitHub
Using Git and GitHub with R
Keep RStudio and GitHub in Sync
This lesson is locked
This lesson is called Keep RStudio and GitHub in Sync, part of the Using Git and GitHub with R course. This lesson is called Keep RStudio and GitHub in Sync, part of the Using Git and GitHub with R course.
If the video is not playing correctly, you can watch it in a new window
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Your Turn
Create a README.md in the
github-first
project and add some textStage this file (and any other modified files) and add a commit message
Hit commit
After you commit, push your changes to GitHub
Go to your GitHub repository and make sure you see your changes
You need to be signed-in to comment on this post. Login.
Juan Clavijo
October 21, 2021
I get this error message after running use_github(): Error in curl::curl_fetch_memory(url, handle = handle) :
Matt M
December 2, 2021
I just got the following error while trying to push an updated for my course project:
>>> C:/Program Files/Git/bin/git.exe push origin HEAD:refs/heads/master To https://github.com/MmattC/CourseProject.git ! [rejected] HEAD -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/MmattC/CourseProject.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Daniel Dunleavy
April 13, 2022
Two questions:
In a project with a lot of commits, is there a way to easily spot which changes were made locally and which were made in GitHub?
Any thoughts/preferences on the GitHub desktop app vs. online interface? Pros and cons?
Jessica Brewer
October 7, 2022
When I created the README.md file in my github-first project, I also had a .gitignore file and a .Rproject file show up in the Git window, so I committed all three and pushed to GitHub. Is this ok?
Emma S
November 10, 2022
I work with extremely sensitive data that cannot be stored in Github for privacy reasons. What would be the best ways to ensure the data is never pushed to Github, only the scripts? Would I just never select the "Staged" checkbox for the dataset(s), or are there other settings or best practices to avoid pushing the data itself?