File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 100100* [ Checkout a new branch without any history] ( https://github.com/git-tips/tips#checkout-a-new-branch-without-any-history )
101101* [ File diff between staging and the last file version.] ( https://github.com/git-tips/tips#file-diff-between-staging-and-the-last-file-version )
102102* [ Extract file from another branch.] ( https://github.com/git-tips/tips#extract-file-from-another-branch )
103+ * [ List only the root and merge commits.] ( https://github.com/git-tips/tips#list-only-the-root-and-merge-commits )
103104
104105<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
105106<!-- @doxie.inject end toc -->
@@ -683,5 +684,10 @@ git diff --staged
683684git show < banch_name> :< file_name>
684685```
685686
687+ ## List only the root and merge commits.
688+ ``` sh
689+ git log --first-parent
690+ ```
691+
686692<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
687693<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 305305},{
306306 "title" : " Extract file from another branch." ,
307307 "tip" : " git show <banch_name>:<file_name>"
308+ }, {
309+ "title" : " List only the root and merge commits." ,
310+ "tip" : " git log --first-parent"
308311}]
You can’t perform that action at this time.
0 commit comments