git pull in the terminal to update the local git repository with the remote git repository hosted at GitHub and update the codes in the project folder.main/clean_data.R, is modified by the work.
git add main/clean_data.R in the terminal to let git track the file.git commit -am "some commit message" in the terminal to commit the file changes to the local git repository. The option -a indicates to commit all changes and -m indicates to add some commit message. You should always add some commit message.git push in the terminal to update the remote git repository hosted at GitHub with the local git repository.
If you cannot push because the remote repository is ahead of the local repository, first git pull and then git push. If git pull causes a conflict, you may have to resolve the conflict.
fileA.txt, had a conflict and you want to overwrite the local changes with the remote changes, you can run the following command in the terminal:git checkout --theirs fileA.txt
git add fileA.txt
git commit -am "overwrite fileA.txt with theirs"
fileA.txt, had a conflict and you want to use the local changes, you can run the following command in the terminal:git checkout --ours fileA.txt
git add fileA.txt
git commit -am "used our fileA.txt