11---
22layout : page
33title : 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
77The routine use of [ git] ( http://git-scm.com ) involves just a few commands:
88principally ` add ` , ` commit ` , and ` push ` , but also ` status ` and
9- ` diff ` .
9+ ` diff ` .
1010
1111You can deal with git and github via a [ GUI] ( http://mac.github.com/ ) ,
1212but 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
1616After you've made some small modifications to your project and
1717checked that they work, use ` git add ` to indicate that they're ready.
18-
18+
1919 $ git add R/modified.R man/modified.Rd
2020
2121Then 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
3030Note 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
3434The commit message should be short (40 or 60 characters) so it's easy
3535to 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.
7979You've made some changes to a project, but you're not sure what. Type
8080
8181 git status
82-
82+
8383It'll give you a list of files that have been changed, plus new
8484files that haven't been formally added.
8585
@@ -89,7 +89,7 @@ files that haven't been formally added.
8989Exactly what changes have you made? Type
9090
9191 git diff
92-
92+
9393Or 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.
143143You don't _ have_ to have a ` .gitignore ` file, but if you don't, those
144144files 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
148148Also, you can have a global such in your home directory; I use
149149` ~/.gitignore_global ` , which contains:
0 commit comments