Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can see above that I have changed 1 file. It’s called stata\setup_example. The yellow square indicates that it is a changed file, as opposed to a new one. This means that there is a copy of the file in the cloud repository that does not match the version on your my computer. In the box on the right, you can see the difference between the file on your my computer and the one in the repository. Green indicates new text and red (not present) represents deleted text.

f. To push these changes to the repository, you should add a brief comment about what changes you made in the small window below the list of changed files. In this case, I might say, "added descriptive comment to top of script." Then I click “commit to master.” This commits the new version of file to your local repository. You need to then “push origin” to put those changes to in the cloud repository.

g. If you decide that you don’t want to commit the changes to the repository, you cab can right click on the file and select discard changes. Confirm that you ant to discard changes in the pop-up window. The file will change back to the original version of the file on disk. Note that this is often my solution when I find that I made changes locally without first pulling the changes to the files that my collaborators made. It’s OK as long as I remember what changes I made, but it would probably be better for me to learn how to stash my version of the file, pull the repository changes, and then merge in my stashed file before pushing the result back up to the cloud. That’s beyond the scope of this tutorial.

...