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 17 of 26
In Progress
Dealing with Common Problems: Merge Conflicts
Your Turn
You should have a merge conflict in the README.md file because you edited it both in RStudio and on GitHub
- Open up the README.md file and find the conflict markers, conflict divider, and identify which parts of the code come from the changes you made in RStudio and which come from the changes you made on GitHub
- Edit the README.md file to resolve the merge conflict
- Commit (I usually use a message like “fix merge conflict”)
- Push your code to GitHub
Learn More
If you get a merge conflict and it makes you feel like you need a hug, Allison Horst has you covered.
Just putting some githugs* out into the world today 💜💚💛
— Allison Horst (@allison_horst) September 22, 2022
*the best typo ever from @juliesquid 🤗 pic.twitter.com/yjn8blP63M
Have any questions? Put them below and we will help you out!
You must be logged in to post a comment.
When I delete the code I don’t want from the merge conflict in the R script box in R Studio and try to commit it, I am getting the following message, “error: Committing is not possible because you have unmerged files.”. How do I address this?
It’s likely you still have a merge conflict somewhere that you haven’t yet dealt with. Take a look all the way to the bottom of your file and let me know if you see anything!