From a4842767094537dfee57698edc3bcc2b74f1ecee Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 30 Oct 2015 19:58:33 +0000 Subject: Adds documentation for revert command Also mentions graph flag for the log command --- git.html.markdown | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'git.html.markdown') 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 +``` ### rm -- cgit v1.2.3 From f0a211b8dd082d9802067a24b8b39a62f867a7f1 Mon Sep 17 00:00:00 2001 From: Nathan Reynolds Date: Mon, 7 Mar 2016 11:33:19 +0000 Subject: Update link to Salesforce Git cheat sheet --- git.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git.html.markdown') diff --git a/git.html.markdown b/git.html.markdown index e7ca07d6..35f24b2d 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -540,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/) -- cgit v1.2.3