File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
1010For a steady stream of TILs from a variety of rocketeers, checkout
1111[ til.hashrocket.com] ( https://til.hashrocket.com/ ) .
1212
13- _ 834 TILs and counting..._
13+ _ 835 TILs and counting..._
1414
1515---
1616
@@ -232,6 +232,7 @@ _834 TILs and counting..._
232232- [ Stashing Only Unstaged Changes] ( git/stashing-only-unstaged-changes.md )
233233- [ Stashing Untracked Files] ( git/stashing-untracked-files.md )
234234- [ Switch To A Recent Branch With FZF] ( git/switch-to-a-recent-branch-with-fzf.md )
235+ - [ Two Kinds Of Dotted Range Notation] ( git/two-kinds-of-dotted-range-notation.md )
235236- [ Untrack A Directory Of Files Without Deleting] ( git/untrack-a-directory-of-files-without-deleting.md )
236237- [ Untrack A File Without Deleting It] ( git/untrack-a-file-without-deleting-it.md )
237238- [ Update The URL Of A Remote] ( git/update-the-url-of-a-remote.md )
Original file line number Diff line number Diff line change 1+ # Two Kinds Of Dotted Range Notation
2+
3+ There are two kinds of dotted range notation in git -- ` .. ` and ` ... ` .
4+
5+ If you'd like to view all changes on your current feature branch since checking
6+ out from ` master ` , you can use the two-dot notation:
7+
8+ ``` bash
9+ ❯ git log master..some-feature-branch --oneline
10+ 9e50bff (some-feature-branch) Add second feature change
11+ b11bb0b Add first feature change
12+ ```
13+
14+ You could also switch the refs around to see what has changed on master since
15+ checking out:
16+
17+ ``` bash
18+ ❯ git log some-feature-branch..master --oneline
19+ c2880f8 (HEAD -> master) Add description to README
20+ ```
21+
22+ Then there is the three-dot notation. This will include all commits from the
23+ second ref that aren't in the first and all commits in the first that aren't in
24+ the second.
25+
26+ ``` bash
27+ ❯ git log master...some-feature-branch --oneline
28+ c2880f8 (HEAD -> master) Add description to README
29+ 9e50bff (some-feature-branch) Add second feature change
30+ b11bb0b Add first feature change
31+ ```
32+
33+ See ` man git-rev-parse ` for more details.
34+
35+ [ source] ( https://stackoverflow.com/a/24186641/535590 )
You can’t perform that action at this time.
0 commit comments