As researchers, you want:
"Piled Higher and Deeper" by Jorge Cham: www.phdcomics.com
Version control system:
$ mkdir ~/Desktop/git_test
$ cd ~/Desktop/git_test
$ git init
Initialized empty Git repository in ~/Desktop/git-test/.git/
$ git clone https://github.com/wrightaprilm/2015-11-16-ISU
git config [options]
git config --global [options]
git config --system [options]
$ git config --global user.name "Your Name Comes Here"
$ git config --global user.email you@yourdomain.com
$ git config --global core.editor vim
$ git config --list
Clone the repository onto your Desktop: https://github.com/fandemonium/git_test
Check your configuration settings by using git config --list
$ git add README
$ git commit -m "My commit message"
git status: show the status of the files of the repository
git log: show commit log
Pro Git Boot, by Scott Chacon: http://git-scm.com/book
git rm FILENAME
git mv FILENAME TARGET
$ git reset HEAD filename
git reset --soft HEAD: uncommits the last commit
$ git checkout -- filename1 filename2
Create a TODO file, and add it to the staging area.
Remove this file from the staging area.
return x ** 2
Add this to the staging area and commit it.
return np.sqrt(x)
Use git checkout to remove the changes you've made to this file. You can check what you have done using git status.
git branch: manages branches
- git branch: lists the branches of the local repository
- git branch [branch_name]: creates a branch
- git branch -d [branch_name]: deletes a branch
git checkout: moves to a branch:
When a conflict emerges, you must manually edit the files:
<<<<<<< HEAD:calc.py print 'the average is', sum(x) / float(len(x)) print 'sumsqdiffs is', sum(diffs) ======= avg = sum(x) / float(len(x)) sumsqdiffs = sum(diffs) / float(len(x)) print 'average is', avg, 'and sumsqdiffs is', sumsqdiffs >>>>>>> edgier:calc.py
Remote repositories are versions of your project that are hosted on the Internet or network somewhere.
In 3 commands:
- git clone --bare --shared my_project my_project.git
- scp -r my_project.git user@git.example.com:/opt/git
- git clone user@git.example.com:/opt/git/my_project
Table of Contents | t |
---|---|
Exposé | ESC |
Presenter View | p |
Source Files | s |
Slide Numbers | n |
Notes | 2 |
Help | h |