Keep RStudio and GitHub in Sync
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.
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
Have any questions? Put them below and we will help you out!
Course Content
26 Lessons
1
Why Use GitHub vs Dropbox, Google Drive, Box, etc?
03:15
2
Dealing with Common Problems: Can't Pull Code from GitHub
08:05
3
Dealing with Common Problems: Merge Conflicts
05:24
4
Dealing with Common Problems: Can't Push Code to GitHub
04:38
5
Let's Keep Bad Things from Happening in the First Place
02:45
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?