diff options
| author | Lidenburg <richard.lindberg1997@gmail.com> | 2016-03-15 18:56:44 +0100 | 
|---|---|---|
| committer | Lidenburg <richard.lindberg1997@gmail.com> | 2016-03-15 18:56:44 +0100 | 
| commit | ce5183bd3d38094401ec37b691fb11c08ec3a07f (patch) | |
| tree | 6227674189be0b6ae719f956c800de98daa4b283 /git.html.markdown | |
| parent | c38933a4d187bb2f7a13b1716e9c6d884b390e89 (diff) | |
| parent | 2095ad9cf5f3243296be5a7232dc52ae03603f49 (diff) | |
Merge remote-tracking branch 'refs/remotes/adambard/master'
Diffstat (limited to 'git.html.markdown')
| -rw-r--r-- | git.html.markdown | 17 | 
1 files changed, 16 insertions, 1 deletions
| diff --git a/git.html.markdown b/git.html.markdown index bedc9853..282abbd2 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  --- @@ -34,6 +35,7 @@ Version control is a system that records changes to a file(s), over time.  * Can work offline.  * Collaborating with others is easy!  * Branching is easy! +* Branching is fast!  * Merging is easy!  * Git is fast.  * Git is flexible. @@ -333,6 +335,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 +504,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 +541,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/) | 
