GitHub: Settings > Manage access > Add people
Project information > Members > Invite members
Now, it’s time to start collaborating.
git clone
git add .
git commit -m "Constructive changes"
git push
Open your browser and navigate to your collaborator’s GitHub repository.
After creating a new branch with git branch my-branch
you have to switch over to that branch before making any edits with
git checkout my-branch
.
git push origin my-branch
).
git pull
git branch revision
git checkout revision
git add .
git commit -m "My changes"
git push origin revision
Start a conversation. Open your collaborator’s repository in RStudio.
Together with your collaborator, create a merge conflicts on each others repositories.
The file containing the merge conflict might look something like the following.
<<<<<<<< HEAD Your changes ======== Your collaborator's changes >>>>>>>> b8e009f666b984509b28a8dedc18e45811be94a6
After resolving the conflict, the file could look as follows.
Your and your collaborator's changesThen you can just stage and commit the conflict resolution as usual.