Skip to content
Neal W Morton edited this page Jan 3, 2018 · 6 revisions

Quick start

If you want to manage your own code for a project (e.g. study-specific code) through the lab's GitHub account, in a directory called "analysis" in the home directory:

  • Go on GitHub and create a new project under the prestonlab organization
  • Clone the project: cd ~/analysis; git clone [email protected]:prestonlab/[projectname].git
  • Add scripts to the directory
  • See the status of the project: cd ~/analysis/[projectname]; git status. You should see each of the script you added.
  • Add those scripts to the list of changes to commit: git add [script1] [script2] ...
  • Make the list of changes to the project: git commit -m 'add scripts for analyzing behavioral data'.
  • The -m flag is very important, since it describes the changes in each commit and can help a lot with keeping track of changes to code over time. It's required, so if you don't specify it, a text editor will open so you can write a message there.
  • Push the changes to GitHub: git push. This will backup your changes, and will make them accessible to other people with access to your project
Clone this wiki locally