mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Adds documentation for revert command
Also mentions graph flag for the log command
This commit is contained in:
parent
f0a4c88acf
commit
a484276709
@ -6,6 +6,7 @@ contributors:
|
|||||||
- ["Leo Rudberg" , "http://github.com/LOZORD"]
|
- ["Leo Rudberg" , "http://github.com/LOZORD"]
|
||||||
- ["Betsy Lorton" , "http://github.com/schbetsy"]
|
- ["Betsy Lorton" , "http://github.com/schbetsy"]
|
||||||
- ["Bruno Volcov", "http://github.com/volcov"]
|
- ["Bruno Volcov", "http://github.com/volcov"]
|
||||||
|
- ["Andrew Taylor", "http://github.com/andrewjt71"]
|
||||||
filename: LearnGit.txt
|
filename: LearnGit.txt
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -333,6 +334,9 @@ $ git log --oneline
|
|||||||
|
|
||||||
# Show merge commits only
|
# Show merge commits only
|
||||||
$ git log --merges
|
$ git log --merges
|
||||||
|
|
||||||
|
# Show all commits represented by an ASCII graph
|
||||||
|
$ git log --graph
|
||||||
```
|
```
|
||||||
|
|
||||||
### merge
|
### merge
|
||||||
@ -499,6 +503,16 @@ $ git reset 31f2bb1
|
|||||||
# after the specified commit).
|
# after the specified commit).
|
||||||
$ git reset --hard 31f2bb1
|
$ 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
|
### rm
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user