diff options
| author | Adam Bard <github@adambard.com> | 2015-10-31 18:28:49 +0800 | 
|---|---|---|
| committer | Adam Bard <github@adambard.com> | 2015-10-31 18:28:49 +0800 | 
| commit | b0dc8331cc9bc354fe3be817dba28f0bb68220d8 (patch) | |
| tree | e2de91cd2e62063186e7fb2079daa006273200b0 /git.html.markdown | |
| parent | 589698d6a3377a61470a68f5ff79594b4bf5ea7b (diff) | |
| parent | a4842767094537dfee57698edc3bcc2b74f1ecee (diff) | |
Merge pull request #1913 from andrewjt71/revert-command-documentation
Adds documentation for revert command
Diffstat (limited to 'git.html.markdown')
| -rw-r--r-- | git.html.markdown | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/git.html.markdown b/git.html.markdown index bedc9853..e7ca07d6 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 | 
