Skip to content

Commit

Permalink
TIL: git shallow clone: pull, fetch without full history
Browse files Browse the repository at this point in the history
  • Loading branch information
pew committed Dec 17, 2023
1 parent d4b2072 commit bce5ccc
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion man/git.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date created: Tuesday, May 7th 2019, 6:33:01 pm
date modified: Friday, June 9th 2023, 11:35:30 am
date modified: Sunday, December 17th 2023, 5:40:26 am
tags:
- git
---
Expand All @@ -9,6 +9,24 @@ tags:

some commands I always forget

## clone and pull without full history (shallow clone)

**clone:**

```shell
git clone --depth 1 <repository-url>
```

**fetch/pull:**

```shell
git fetch --depth 1
```

```shell
git pull --depth 1
```

## find deleted file

in order to restore something, you might want to know when it was deleted…:
Expand Down

0 comments on commit bce5ccc

Please sign in to comment.