Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bf2a7e22
Commit
bf2a7e22
authored
Jul 01, 2020
by
James Ramsay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Git LFS example
parent
01682e0e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
doc/user/project/repository/reducing_the_repo_size_using_git.md
...er/project/repository/reducing_the_repo_size_using_git.md
+13
-1
No files found.
doc/user/project/repository/reducing_the_repo_size_using_git.md
View file @
bf2a7e22
...
@@ -40,12 +40,24 @@ To make cloning your project faster, rewrite branches and tags to remove unwante
...
@@ -40,12 +40,24 @@ To make cloning your project faster, rewrite branches and tags to remove unwante
1.
Using
`git filter-repo`
, purge any files from the history of your repository.
1.
Using
`git filter-repo`
, purge any files from the history of your repository.
To purge
all
large files, the
`--strip-blobs-bigger-than`
option can be used:
To purge large files, the
`--strip-blobs-bigger-than`
option can be used:
```
shell
```
shell
git filter-repo
--strip-blobs-bigger-than
10M
git filter-repo
--strip-blobs-bigger-than
10M
```
```
To purge large files stored using Git LFS, the
`--blob--callback`
option can
be used:
```
shell
git filter-repo
--blob-callback
'
if blob.data.startswith(b"version https://git-lfs.github.com/spec/v1"):
size_in_bytes = int.from_bytes(blob.data[124:], byteorder="big")
if size_in_bytes > 10*1000:
blob.skip()
'
```
To purge specific large files by path, the
`--path`
and
`--invert-paths`
options can be combined:
To purge specific large files by path, the
`--path`
and
`--invert-paths`
options can be combined:
```
shell
```
shell
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment