Setting_up_git - labordynamicsinstitute/replicability-training GitHub Wiki
Installing Git on your computer
Follow the instructions at the general LDI wiki.
Sourcetree installation problem on MacOS
Sourcetree (Git graphical interface optimized for Bitbucket) is an optional program to install. However, you may run into an error message on mac: "Sourcetree can’t be opened because Apple cannot check it for malicious software.". This is because Sourcetree is not a verified program on Mac.
Solution: you could install the program by force using System Preferences, or running terminal commands.
Learning the basics of Git for the replication project
In general, we will provide you with the command line instructions for git. Graphical interfaces may allow you to do the same thing, but the command line instructions are identical across all platforms and operating systems.
Follow the instructions at https://git-scm.com/docs/gittutorial. For hands-on, make the following adaptations:
-
The tutorial mentions
Assume you have a tarball project.tar.gz with your initial work.
Instead of project.tar.gz use https://www.aeaweb.org/articles/attachments?retrieve=femSIQOVNV_qoIaa_KFuGWz1VIdU0xVS (from https://doi.org/10.1257/mac.20150153) -
Unzip it in a folder of your choice
-
Move into the unzipped folder using
cd path/to/folder
in your terminal window, where path/to/folder is the path to the folder -
Put the folder under version control using
git init
-
Follow the examples in the Tutorial.
Note: this is only to gain some experience with git. Once you are done experimenting, you can delete the entire directory again.
Once you are comfortable, you should proceed to a real test. See the start of the workflow here.