mirror of
https://github.com/namibia/tips.git
synced 2024-11-05 21:07:53 +00:00
Add tip for shallow copy
This commit is contained in:
parent
cffab88ab8
commit
ca7e782a9f
@ -118,6 +118,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
|
|||||||
* [specific color settings](#specific-color-settings)
|
* [specific color settings](#specific-color-settings)
|
||||||
* [Show all local branches ordered by recent commits](#show-all-local-branches-ordered-by-recent-commits)
|
* [Show all local branches ordered by recent commits](#show-all-local-branches-ordered-by-recent-commits)
|
||||||
* [Find lines matching the pattern (regex or string) in tracked files](#find-lines-matching-the-pattern-regex-or-string-in-tracked-files)
|
* [Find lines matching the pattern (regex or string) in tracked files](#find-lines-matching-the-pattern-regex-or-string-in-tracked-files)
|
||||||
|
* [Clone a shallow copy of a repository](#clone-a-shallow-copy-of-a-repository)
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
@ -811,5 +812,10 @@ git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/
|
|||||||
git grep --heading --line-number 'foo bar'
|
git grep --heading --line-number 'foo bar'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Clone a shallow copy of a repository
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/user/repo.git --depth 1
|
||||||
|
```
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
@ -357,4 +357,7 @@
|
|||||||
},{
|
},{
|
||||||
"title": "Find lines matching the pattern (regex or string) in tracked files",
|
"title": "Find lines matching the pattern (regex or string) in tracked files",
|
||||||
"tip": "git grep --heading --line-number 'foo bar'"
|
"tip": "git grep --heading --line-number 'foo bar'"
|
||||||
}]
|
}, {
|
||||||
|
"title": "Clone a shallow copy of a repository",
|
||||||
|
"tip": "git clone https://github.com/user/repo.git --depth 1"
|
||||||
|
}]
|
Loading…
Reference in New Issue
Block a user