Skip to content

Commit 8cfc442

Browse files
committed
Fix small problems - can't use colon within description
1 parent c8da87f commit 8cfc442

12 files changed

Lines changed: 53 additions & 56 deletions

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: page
33
title: git/github guide
44
tagline: a minimal tutorial
5-
description: Git/GitHub Guide: a minimal tutorial
5+
description: Git/GitHub Guide - a minimal tutorial
66
---
77

88
All statistical/computational scientists should use

pages/amend_commit_msg.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: Amend the last commit message
4-
description: Git/GitHub Guide: amend the last commit message
4+
description: How to amend the last git commit message
55
---
66

77
“Oops! That last commit message was screwed up.
@@ -14,8 +14,8 @@ that I hadn't mentioned in the commit message.
1414
It's easy to fix just the message for the last commit:
1515

1616
$ git commit --amend -m "New commit message"
17-
17+
1818
Or leave off the `-m "New commit message"` and type the message in the
19-
text editor that opens.
19+
text editor that opens.
2020

2121
**Next**: [Exploring code and its history](exploring_code.html)

pages/branching.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: Branching and merging
4-
description: Git/GitHub Guide: branching and merging
4+
description: Git branching and merging
55
---
66

77
I touched on just a few things about git. Get yourself going with git and
@@ -22,13 +22,13 @@ To create a branch called `new_feature`:
2222
Then “check it out”:
2323

2424
$ git checkout new_feature
25-
25+
2626
Make various modifications, and then add and commit.
2727

2828
To go back to the master branch, check it out:
2929

3030
$ git checkout master
31-
31+
3232
To push the branch to github, use this:
3333

3434
$ git push origin new_feature
@@ -38,13 +38,13 @@ into your exploratory one:
3838

3939
$ git checkout new_feature
4040
$ git merge master
41-
41+
4242
If you're satisfied with your changes in the exploratory branch, merge
4343
them into the master:
4444

4545
$ git checkout master
4646
$ git merge new_feature
47-
47+
4848
If you're done with the branch and want to delete it:
4949

5050
$ git branch -d new_feature
@@ -53,12 +53,12 @@ But if you pushed it to github, it will still exist there. This is
5353
how to delete the branch from github:
5454

5555
$ git push origin --delete new_feature
56-
56+
5757
After pulling from github, use the following to get access to a branch
5858
that is only on github:
5959

6060
$ git checkout -b new_feature origin/new_feature
61-
61+
6262
If you want to pull a particular branch from a collaborator's
6363
repository, do this:
6464

pages/exploring_code.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: Exploring code and its history
4-
description: Git/GitHub Guide: exploring code and its history
4+
description: Exploring code and its history with git and GitHub
55
---
66

77
For my own repositories, I like to use [gitx](http://gitx.frim.nl/) on
@@ -80,7 +80,7 @@ And again you can use this for a particular file:
8080
`git diff` has a ton of options; see the manual page:
8181

8282
git diff --help
83-
83+
8484
For example, you can get a brief summary of which files were changed with `--stat`:
8585

8686
git diff 1.22-21 1.23-16 --stat

pages/first_time.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: Your first time with git and github
4-
description: Git/GitHub Guide: initial setup
4+
description: Initial setup for git and GitHub
55
---
66

77
If you've never used git or github before, there are a bunch of things
@@ -14,18 +14,18 @@ but repeated here for completeness.
1414
- Set up git with your user name and email.
1515

1616
- Open a terminal/shell and type:
17-
17+
1818
$ git config --global user.name "Your name here"
1919
$ git config --global user.email "your_email@example.com"
2020

2121
(Don't type the `$`; that just indicates that you're doing this at
2222
the command line.)
2323

2424
I also do:
25-
25+
2626
$ git config --global color.ui true
2727
$ git config --global core.editor emacs
28-
28+
2929
The first of these will enable colored output in the terminal; the
3030
second tells git that you want to use emacs.
3131

@@ -37,12 +37,12 @@ but repeated here for completeness.
3737
- Look to see if you have files `~/.ssh/id_rsa` and
3838
`~/.ssh/id_rsa.pub`.
3939
- If not, create such public/private keys: Open a terminal/shell and type:
40-
40+
4141
$ ssh-keygen -t rsa -C "your_email@example.com"
4242

4343
- Copy your public key (the contents of the newly-created
4444
`id_rsa.pub` file) into your clipboard. **On a Mac**, in the terminal/shell, type:
45-
45+
4646
$ pbcopy < ~/.ssh/id_rsa.pub
4747

4848
- Paste your ssh public key into your github account settings.
@@ -53,11 +53,11 @@ but repeated here for completeness.
5353
- Add a label (like &ldquo;My laptop&rdquo;) and paste the public
5454
key into the big text box.
5555
- In a terminal/shell, type the following to test it:
56-
56+
5757
$ ssh -T git@github.com
58-
58+
5959
- If it says something like the following, it worked:
60-
60+
6161
Hi username! You've successfully authenticated, but Github does
6262
not provide shell access.
6363

pages/fork.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: Contribute to someone's repository
4-
description: Git/GitHub Guide: contributing to someone's repository
4+
description: Contributing to someone's GitHub repository
55
---
66

77
Say you want to contribute changes to someone else's repository (eg,
@@ -104,10 +104,10 @@ Once they do that, you'll get an email about it. How to handle it?
104104

105105
- If you want them to make further changes before you merge
106106
the changes into your repository, add a comment.
107-
107+
108108
- If you hate the whole idea, just click the &ldquo;Close&rdquo;
109109
button.
110-
110+
111111
- If you want to merge the changes into your repository, click the
112112
&ldquo;Merge pull request&rdquo; button.
113113

@@ -128,13 +128,13 @@ You don't have to use the github website for this.
128128

129129
- Add a connection to your friend's version of the github repository,
130130
if you haven't already.
131-
131+
132132
$ git remote add myfriend git://github.com/myfriend/the_repo
133-
133+
134134
- Pull his/her changes.
135135

136136
$ git pull myfriend master
137-
137+
138138
- Push them back to your github repository.
139139

140140
$ git push

pages/init.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: Start a new git repository
4-
description: Git/GitHub Guide: creating a new git repository
4+
description: Creating a new git repository
55
---
66

77
Your first instinct, when you start to do something new, should be
@@ -25,7 +25,7 @@ start exploring it.
2525
The first file to create (and add and commit) is probably a ReadMe
2626
file, either as plain text or with
2727
[Markdown](http://daringfireball.net/projects/markdown/), describing
28-
the project.
28+
the project.
2929

3030
Markdown allows you to add a bit of text markup, like
3131
[hyperlinks](http://en.wikipedia.org/wiki/Hyperlink),
@@ -71,7 +71,7 @@ repository...&rdquo;
7171
Actually, the first line of the instructions will say
7272

7373
$ git remote add origin https://github.com/username/new_repo
74-
74+
7575
But I use `git@github.com:username/new_repo` rather than `https://github.com/username/new_repo`, as the
7676
former is for use with
7777
[ssh](http://en.wikipedia.org/wiki/Secure_Shell) (if you set up ssh as
@@ -81,6 +81,3 @@ you use the latter construction, you'll have to type your github
8181
password every time you push to github.
8282

8383
**Next**: [Contribute to someone's repository](fork.html)
84-
85-
86-

pages/merge_conflicts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
layout: page
33
title: Handling merge conflicts
4-
description: Git/GitHub Guide: handling merge conflicts
4+
description: Handling git merge conflicts
55
---
66

77
One of the best features of [git](http://git-scm.com) is its ability
8-
to easily merge multiple changes by different people.
8+
to easily merge multiple changes by different people.
99

1010
Say you and a
11-
friend have both made changes to the same file at the same time.
11+
friend have both made changes to the same file at the same time.
1212
When you pull your friend's changes, git will often be able to combine
13-
them without any problem.
13+
them without any problem.
1414

1515
Sometimes, though, after you do
1616

pages/resources.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: git/github resources
4-
description: Git/GitHub Guide: resources page
4+
description: git/GitHub resources page
55
---
66

77
This tutorial is minimal. It's probably considerably less than
@@ -17,7 +17,7 @@ Here are some examples.
1717

1818
- The O'Reilly
1919
[Version Control with Git book](http://shop.oreilly.com/product/9780596520137.do)
20-
20+
2121
- The [github help pages](https://help.github.com/)
2222

2323
- [Git tutorials on github](http://learn.github.com/); you can even
@@ -33,15 +33,15 @@ Here are some examples.
3333
by [Kevin Markham](http://www.dataschool.io/about/)
3434

3535
- Using GitHub with [RStudio](http://www.rstudio.com):
36-
36+
3737
- [Using GitHub with R and Rstudio](http://markrchristie.wordpress.com/2013/11/26/using-github-with-r-and-rstudio/)
3838
by [Mark Christie](http://markrchristie.wordpress.com/)
3939

4040
- [Getting started with GitHub](http://jennybc.github.io/2014-05-12-ubc/ubc-r/session2.4_github.html)
4141
from materials for a
4242
[software carpentry](http://software-carpentry.org/)
4343
[course at UBC](http://jennybc.github.io/2014-05-12-ubc/)
44-
44+
4545
- [Google](http://bit.ly/13lFEmG)
4646

4747
- [Stackoverflow](http://stackoverflow.com/questions/tagged/git)

pages/routine.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
layout: page
33
title: Routine use of git and github
4-
description: Git/GitHub Guide: day-to-day use
4+
description: Day-to-day use of git and GitHub
55
---
66

77
The routine use of [git](http://git-scm.com) involves just a few commands:
88
principally `add`, `commit`, and `push`, but also `status` and
9-
`diff`.
9+
`diff`.
1010

1111
You can deal with git and github via a [GUI](http://mac.github.com/),
1212
but I prefer the command line, and so that's all I'll discuss.
@@ -15,7 +15,7 @@ but I prefer the command line, and so that's all I'll discuss.
1515

1616
After you've made some small modifications to your project and
1717
checked that they work, use `git add` to indicate that they're ready.
18-
18+
1919
$ git add R/modified.R man/modified.Rd
2020

2121
Then use `git commit` to add the modifications to the repository.
@@ -29,7 +29,7 @@ To abandon your commit, exit the editor without adding text.
2929

3030
Note that `git add` is used to add completely new files as well as to
3131
&ldquo;add&rdquo; modifications to files that already exist in the
32-
repository.
32+
repository.
3333

3434
The commit message should be short (40 or 60 characters) so it's easy
3535
to read in a list. For a more complex commit, write an initial line
@@ -79,7 +79,7 @@ changes, they may not get to github for months.
7979
You've made some changes to a project, but you're not sure what. Type
8080

8181
git status
82-
82+
8383
It'll give you a list of files that have been changed, plus new
8484
files that haven't been formally added.
8585

@@ -89,7 +89,7 @@ files that haven't been formally added.
8989
Exactly what changes have you made? Type
9090

9191
git diff
92-
92+
9393
Or to see your changes to a particular file, type
9494

9595
git diff R/modified.R
@@ -143,7 +143,7 @@ in git should be indicated in a `.gitignore` file.
143143
You don't _have_ to have a `.gitignore` file, but if you don't, those
144144
files will show up every time you type `git status`.
145145

146-
Each subdirectory can have its own `.gitignore` file, too.
146+
Each subdirectory can have its own `.gitignore` file, too.
147147

148148
Also, you can have a global such in your home directory; I use
149149
`~/.gitignore_global`, which contains:

0 commit comments

Comments
 (0)