summaryrefslogtreecommitdiffhomepage
path: root/git.html.markdown
diff options
context:
space:
mode:
authorDavid Hsieh <davidhsiehlo@gmail.com>2016-03-11 08:39:55 -0600
committerDavid Hsieh <davidhsiehlo@gmail.com>2016-03-11 08:39:55 -0600
commitceb99e14019672309ca80350054b7bb1a6642a48 (patch)
tree1cca5af13a146c0a36ef760b6264d18875290ec0 /git.html.markdown
parent51c2f7ce28caf1cc654bcafc4063f3012cc2f0c3 (diff)
parent8d1e2e31ef9c62e2833ccb83cde78caef668f044 (diff)
Merge branch 'adambard-master' into r-spanish
Diffstat (limited to 'git.html.markdown')
-rw-r--r--git.html.markdown16
1 files changed, 15 insertions, 1 deletions
diff --git a/git.html.markdown b/git.html.markdown
index bedc9853..35f24b2d 100644
--- a/git.html.markdown
+++ b/git.html.markdown
@@ -6,6 +6,7 @@ contributors:
- ["Leo Rudberg" , "http://github.com/LOZORD"]
- ["Betsy Lorton" , "http://github.com/schbetsy"]
- ["Bruno Volcov", "http://github.com/volcov"]
+ - ["Andrew Taylor", "http://github.com/andrewjt71"]
filename: LearnGit.txt
---
@@ -333,6 +334,9 @@ $ git log --oneline
# Show merge commits only
$ git log --merges
+
+# Show all commits represented by an ASCII graph
+$ git log --graph
```
### merge
@@ -499,6 +503,16 @@ $ git reset 31f2bb1
# after the specified commit).
$ git reset --hard 31f2bb1
```
+### revert
+
+Revert can be used to undo a commit. It should not be confused with reset which restores
+the state of a project to a previous point. Revert will add a new commit which is the
+inverse of the specified commit, thus reverting it.
+
+```bash
+# Revert a specified commit
+$ git revert <commit>
+```
### rm
@@ -526,7 +540,7 @@ $ git rm /pather/to/the/file/HelloWorld.c
* [Atlassian Git - Tutorials & Workflows](https://www.atlassian.com/git/)
-* [SalesForce Cheat Sheet](https://na1.salesforce.com/help/doc/en/salesforce_git_developer_cheatsheet.pdf)
+* [SalesForce Cheat Sheet](http://res.cloudinary.com/hy4kyit2a/image/upload/SF_git_cheatsheet.pdf)
* [GitGuys](http://www.gitguys.com/)