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
acf5e92f
Commit
acf5e92f
authored
Aug 07, 2020
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve git-lfs migrate steps
parent
cdaaea55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
doc/topics/git/lfs/migrate_to_git_lfs.md
doc/topics/git/lfs/migrate_to_git_lfs.md
+15
-3
No files found.
doc/topics/git/lfs/migrate_to_git_lfs.md
View file @
acf5e92f
...
@@ -96,9 +96,10 @@ Consider an example upstream project, `git@gitlab.com:gitlab-tests/test-git-lfs-
...
@@ -96,9 +96,10 @@ Consider an example upstream project, `git@gitlab.com:gitlab-tests/test-git-lfs-
1.
Clean up the repository:
1.
Clean up the repository:
```
shell
```
shell
#
cd path/to/mirror/repo
:
#
Change into the mirror repo directory
:
cd
test-git-lfs-repo-migration.git
cd
test-git-lfs-repo-migration.git
# clean up the repo:
# Clean up the repo:
git reflog expire
--expire
=
now
--all
&&
git gc
--prune
=
now
--aggressive
git reflog expire
--expire
=
now
--all
&&
git gc
--prune
=
now
--aggressive
```
```
...
@@ -128,12 +129,23 @@ Consider an example upstream project, `git@gitlab.com:gitlab-tests/test-git-lfs-
...
@@ -128,12 +129,23 @@ Consider an example upstream project, `git@gitlab.com:gitlab-tests/test-git-lfs-
1.
Track the files you want with LFS:
1.
Track the files you want with LFS:
```
shell
```
shell
# cd path/to/upstream/repo:
# Change into the /tmp directory
cd
/tmp
# Clone the repo
git clone git@gitlab.com:gitlab-tests/test-git-lfs-repo-migration.git
# Change into the upstream repo directory:
cd
test-git-lfs-repo-migration
cd
test-git-lfs-repo-migration
# You may need to reset your local copy with upstream's `master` after force-pushing from the mirror:
# You may need to reset your local copy with upstream's `master` after force-pushing from the mirror:
git reset
--hard
origin/master
git reset
--hard
origin/master
# Track the files with LFS:
# Track the files with LFS:
git lfs track
"*.gif"
"*.png"
"*.jpg"
"*.psd"
"*.mp4"
"img/"
git lfs track
"*.gif"
"*.png"
"*.jpg"
"*.psd"
"*.mp4"
"img/"
# Push up changes to .gitattributes
git add .gitattributes
&&
git commit
-m
'Track .gif,.png,.jpg,.psd,.mp4 and img/'
&&
git push
```
```
Now all existing the files you converted, as well as the new
Now all existing the files you converted, as well as the new
...
...
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