From d7e4e4a422de96a0eb220c231a49ba844ddbbc41 Mon Sep 17 00:00:00 2001 From: ank91 Date: Fri, 10 Jun 2016 16:10:16 +0530 Subject: [PATCH] Add clone single branch command --- README.md | 6 ++++++ tips.json | 3 +++ 2 files changed, 9 insertions(+) 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" }]