diff --git a/README.md b/README.md index 582c32d..8dbae51 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Find guilty with binary search](#find-guilty-with-binary-search) * [Bypass pre-commit and commit-msg githooks](#bypass-pre-commit-and-commit-msg-githooks) * [List commits and changes to a specific file (even through renaming)](#list-commits-and-changes-to-a-specific-file-even-through-renaming) +* [Clone a single branch](#clone-a-single-branch) @@ -733,5 +734,10 @@ git commit --no-verify git log --follow -p -- ``` +## Clone a single branch +```sh +git clone -b --single-branch https://github.com/user/repo.git +``` + diff --git a/tips.json b/tips.json index 6f90fca..e2744b9 100644 --- a/tips.json +++ b/tips.json @@ -324,4 +324,7 @@ }, { "title": "List commits and changes to a specific file (even through renaming)", "tip": "git log --follow -p -- " +},{ + "title": "Clone a single branch", + "tip": "git clone -b --single-branch https://github.com/user/repo.git" }]