mirror of
https://github.com/namibia/tips.git
synced 2024-12-23 10:38:58 +00:00
Merge pull request #77 from ank91/patch/1
Add clone single branch command
This commit is contained in:
commit
d6bb50e4dd
@ -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)
|
* [Find guilty with binary search](#find-guilty-with-binary-search)
|
||||||
* [Bypass pre-commit and commit-msg githooks](#bypass-pre-commit-and-commit-msg-githooks)
|
* [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)
|
* [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)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end toc -->
|
<!-- @doxie.inject end toc -->
|
||||||
@ -733,5 +734,10 @@ git commit --no-verify
|
|||||||
git log --follow -p -- <file_path>
|
git log --follow -p -- <file_path>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Clone a single branch
|
||||||
|
```sh
|
||||||
|
git clone -b <branch-name> --single-branch https://github.com/user/repo.git
|
||||||
|
```
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end -->
|
<!-- @doxie.inject end -->
|
||||||
|
@ -324,4 +324,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"title": "List commits and changes to a specific file (even through renaming)",
|
"title": "List commits and changes to a specific file (even through renaming)",
|
||||||
"tip": "git log --follow -p -- <file_path>"
|
"tip": "git log --follow -p -- <file_path>"
|
||||||
|
},{
|
||||||
|
"title": "Clone a single branch",
|
||||||
|
"tip": "git clone -b <branch-name> --single-branch https://github.com/user/repo.git"
|
||||||
}]
|
}]
|
||||||
|
Loading…
Reference in New Issue
Block a user