This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git diff --cached | |
| diff --git a/foo.rb b/foo.rb | |
| index c1590ba..33c40b2 100644 | |
| --- a/foo.rb | |
| +++ b/foo.rb | |
| @@ -1,10 +1,10 @@ | |
| class Foo | |
| def bar | |
| - puts 'bar' | |
| + puts 'BAR' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git diff | |
| diff --git a/foo.rb b/foo.rb | |
| index 33c40b2..91801c6 100644 | |
| --- a/foo.rb | |
| +++ b/foo.rb | |
| @@ -1,18 +1,16 @@ | |
| class Foo | |
| def bar | |
| puts 'BAR' | |
| + $logger.log 'Foo#bar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git add -p | |
| diff --git a/foo.rb b/foo.rb | |
| index 33c40b2..91801c6 100644 | |
| --- a/foo.rb | |
| +++ b/foo.rb | |
| @@ -1,18 +1,16 @@ | |
| class Foo | |
| def bar | |
| puts 'BAR' | |
| + $logger.log 'Foo#bar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Manual hunk edit mode -- see bottom for a quick guide | |
| @@ -1,18 +1,16 @@ | |
| class Foo | |
| def bar | |
| puts 'BAR' | |
| + $logger.log 'Foo#bar' | |
| end | |
| · | |
| def baz | |
| puts 'BAZ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git diff --cached | |
| diff --git a/foo.rb b/foo.rb | |
| index 33c40b2..f8879cf 100644 | |
| --- a/foo.rb | |
| +++ b/foo.rb | |
| @@ -1,10 +1,12 @@ | |
| class Foo | |
| def bar | |
| puts 'BAR' | |
| + $logger.log 'Foo#bar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git diff | |
| diff --git a/foo.rb b/foo.rb | |
| index f8879cf..91801c6 100644 | |
| --- a/foo.rb | |
| +++ b/foo.rb | |
| @@ -11,10 +11,6 @@ class Foo | |
| private | |
| - def qux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git diff | |
| diff --git a/foo.rb b/foo.rb | |
| index 8c21f23..c1590ba 100644 | |
| --- a/foo.rb | |
| +++ b/foo.rb | |
| @@ -12,4 +12,8 @@ class Foo | |
| def qux | |
| puts 'qux' | |
| end | |
| + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git status | |
| # On branch master | |
| # Changes to be committed: | |
| # (use "git reset HEAD <file>..." to unstage) | |
| # | |
| # modified: foo.rb | |
| # | |
| # Changes not staged for commit: | |
| # (use "git add <file>..." to update what will be committed) | |
| # (use "git checkout -- <file>..." to discard changes in working directory) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git commit -m 'Foo#baz' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git commit -am 'Foo#quux' |