-
Notifications
You must be signed in to change notification settings - Fork 3
Useful Git commands
Below you will find a set of Git commands that are relevant to maintaining the LSNM GitHub repository. For a more detailed description of the commands listed below, please refer to Scott Chacon's Pro Git Book.
The following command downloads a copy of the LSNM repository to your local system (a.k.a "cloning a repository"):
$ git clone https://github.com/NIDCD/lsnm.git
Please note that the previous command will create a directory called "lsnm" in your current directory so any other directory previously named "lsnm" and located in the same directory might (will) be overwritten!
$ cd lsnm
$ git fetch origin
where origin has been defined as:
$ git remote add origin git@github.com:NIDCD/lsnm.git
$ git remote -v
$ git merge origin
$ git pull origin master
You have to use "pull-then-push" approach, which means you have to pull changes from the repository in order to merge them with you local changes and then push the changes back to the repository (don't forget to commit your local changes first!):
$ git pull origin master
$ git push origin master
The following basic commands are useful to keep track of changes to the LSNM software:
$ git status
$ git commit -a -m 'include a relevant comment here'
$ git mv old_file_name new_file_name
$ git rm file_not_needed
$ git add file_name
$ git add -A
$ gitk
$ git gui
To initialize git in current directory (you only need to do this once at the very beginning and when you need to start from scratch):
$ git init
$ git config --global core.editor emacs
To declare your name in the git version control system (you only need to this once and git with label changes you make with YOUR name declared here):
$ git config --global user.name "John Doe"
$ git config --global user.email "john.doe@nih.gov"
$ git clone --bare LSNM LSNM.git
$ git push origin master
The following is an example screenshot of the gitk application, which allows you to visulalize the history of changes/updates to the LSNM directory:
About
Getting Started
Essentials
- Basic commands
- Setting up a network
- Simulating a multi-trial, multi-subject visual experiment
- Simulating a multi-trial, multi-subject auditory experiment
- Simulating neuroimaging data
- Frequently Asked Questions
Tutorials
Extras