Run 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.
Run dvc commit just in case you have modified files in your local folder. This updates .dvc folder with the information on the modified files.
Run dvc pull in the terminal to update the local dvc repository with the remote dvc repository hosted at AWS s3 and update the data files in the project folder.
dvc pull may remove your latest changes in the data. In that case, dvc asks whether the file can be erased. If you don't think the file should be erased, answer n to stop the process and move to the next step.folder/file, run dvc add folder/file. If you created a file in a tracked folder, say, folder/file, run dvc commit. Then, run git commit -am "some message" and run dvc pull.Do some work.
When your work is done, you commit and push the changes. If you are afraid that the others might have pushed changes to the remote repository, you should first run git pull to update the local git repository. However, do NOT run dvc pull.
git pull, the .dvc file is synced with the remote repository. If you dvc pull, the changes in data in your local folder can be overwritten by the remote changes. dvc returns a warning if this happens. If you do not want to overwrite the local changes, make sure to answer "n".Suppose that some code, say main/clean_data.R is modified by the work.
git add main/clean_data.R in the terminal to let git track the file.Suppose that some data file, say output/cleaned_data.rds, is generated or modified by the work.
git pull to update .dvc files.dvc add output in the terminal to let dvc track files in the folder.dvc commit in the terminal to reflect the changes in the data to the local repository. If there is a tracked and modified folder, the prompt asks you whether to update the folder. Answer yes if they are the folders you modified.Run 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.
Run 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, has 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 termianl:git checkout --ours fileA.txt
git add fileA.txt
git commit -am "used our fileA.txt"
Run dvc push in the terminal to update the remote dvc repository hosted at AWS s3 with the local dvc repository.
https://s3-us-west-2.amazonaws.com/secure.notion-static.com/f2242ba7-ec27-44ea-b0eb-92c945fe0c6d/Economics_-_main_-_RStudio_2021-04-05_15-25-30.mp4