Main
main - this is the main repo, where all your code should start and end.
When we work with others we don’t push to main.
We’ll use just a little bit of git in this class.
main - this is the main repo, where all your code should start and end.
When we work with others we don’t push to main.
branches - these are temporary repositories that you make changes in. They are copies of main at the time you made your branch.
You can do anything you want in your branch.
Generally one big change gets a branch. This is often called a feature.
Once you are done in your branch you need to pull the changes into main.
You make a pull request on github.com
While you were working on a file, your partner was too.
If there is different code in the same line github needs your help to decide which one to keep.
This is marked in the file with
>>>>>>>
code
=======
more code
<<<<<<<
You might see this:
We can set a default merge strategy for your repo by opening the terminal and typing
git config pull.rebase false
You will resolve conflicts either on github.com or in RStudio.
After pull requests its easy enough to use github’s interface.
Sometime when you pull in R you’ll be promoted to solve a merge conflict.
Either way delete the >>>>>>>>
and <<<<<<<<
and ========
and select the line of code you want.