diff options
author | Adam Bard <github@adambard.com> | 2013-07-21 17:29:20 -0700 |
---|---|---|
committer | Adam Bard <github@adambard.com> | 2013-07-21 17:29:20 -0700 |
commit | 801f684a54238484f24501dd577637c8aef50a88 (patch) | |
tree | 146c2c4c04b6c8d40716d52ce1f49e0cf3a7a4fa | |
parent | 4e848cbfd00667bf51c956c5fa1f7a0d7c4213e6 (diff) | |
parent | 48bb3b01784e486b711b56becf8f7ef43823efe0 (diff) |
Merge pull request #131 from Jakehp/patch-1
Added diff & cleanup.
-rw-r--r-- | git.html.markdown | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/git.html.markdown b/git.html.markdown index c10559c7..8c2261cc 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -9,13 +9,10 @@ filename: LearnGit.txt Git is a distributed version control and source code management system. -Git does this through a series of snapshopts of your project, and it works +It does this through a series of snapshopts of your project, and it works with those snapshots to provide you with functionality to version and manage your source code. -In layman's terms, it's a way of managing, and keeping a detailed historical record, -of your source code. - ## Versioning Concepts ### What is version control? @@ -219,6 +216,21 @@ the changes made and a message created by the user. $ git commit -m "Added multiplyNumbers() function to HelloWorld.c" ``` +### diff + +Shows differences between a file in the working directory, index and commits. + +```bash +# Show difference between your working dir and the index +$ git diff + +# Show differences between the index and the most recent commit. +$ git diff --cached + +# Show differences between your working dir, and the most recent commit +$ git diff HEAD +``` + ### grep Allows you to quickly search a repository. @@ -370,3 +382,5 @@ $ 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) + +* [GitGuys](http://www.gitguys.com/) |