##// END OF EJS Templates
docs: updated tutorials for Git LFS and Mercurial Largefiles.
marcink -
r1599:d7f53eb9 default
parent child Browse files
Show More
@@ -0,0 +1,93 b''
1 .. _git-lfs-files:
2
3 |git| LFS Extension
4 ===================
5
6
7 Git Large File Storage (or LFS) is a new, open-source extension to Git that
8 aims to improve handling of large files. It does this by replacing large files
9 in your repository—such as graphics and videos—with simple text pointers.
10 |RC| Server includes an embedded LFS object store server, allowing storage of
11 large files without the need for an external object store.
12 Git LFS is disabled by default, globally, and for each individual repository.
13
14 .. note::
15
16 |RC| implements V2 API of Git LFS. Please make sure your git client is
17 using the latest version (2.0.X recommended) to leverage full feature set
18 of the V2 API.
19
20
21
22 Enabling Git LFS
23 ++++++++++++++++
24
25 Git LFS is disabled by default within |RC| Server.
26
27 To enable Git LFS Globally:
28
29 - Go to :menuselection:`Admin --> Settings --> VCS`
30
31 - Scroll down into `Git settings`
32
33 - Tick `Enable lfs extension`
34
35 - Save your settings.
36
37 Those settings apply globally to each repository that inherits from the defaults
38 You can leave `lfs extension` disabled globally, and only enable it per
39 repository that would use the lfs.
40
41
42 .. note::
43
44 You might want to adjust the global storage location at that point, however
45 we recommend leaving the default one created.
46
47
48 Installing and using the Git LFS command line client
49 ++++++++++++++++++++++++++++++++++++++++++++++++++++
50
51 Git LFS aims to integrate with the standard Git workflow as seamlessly
52 as possible. To push your first Git LFS files to an existing repository
53 Download and install the git-lfs command line client
54 Install the Git LFS filters::
55
56 git lfs install
57
58 This adds the following lines to the .gitconfig file located in your home directory::
59
60 [filter "lfs"]
61 clean = git-lfs clean %f
62 smudge = git-lfs smudge %f
63 required = true
64
65 The above change applies globally, so it is not necessary to run this for
66 each repository you work with. Choose the file types you would like LFS to
67 handle by executing the git lfs track command. The git lfs track command
68 creates or updates the .gitattributes file in your repository.
69 Change to your cloned repository, then execute git add to ensure updates
70 to the .gitattributes are later committed::
71
72 git lfs track "*.jpg"
73 git add .gitattributes
74
75 Add, commit, and push your changes as you normally would::
76
77 git add image.jpg
78 git commit -m "Added an image"
79 git push
80
81 When pushed, the Git tree updates to include a pointer to the file actual
82 file content. This pointer will include the SHA256 hash of the object and its
83 size in bytes. For example::
84
85 oid sha256:4fa32d6f9b1461c4a53618a47324ee43e36ce7ceaea2ad440cc811a7e6881be1
86 size 2580390
87
88
89 The object itself will be uploaded to a separate location via the Git LFS Batch API.
90 The transfer is validated and authorized by |RC| server itself.
91
92 If give repository has Git LFS disabled, a proper message will be sent back to
93 the client and upload of LFS objects will be forbidden.
@@ -9,6 +9,36 b' has a large files extension which tracks'
9 9 means that the large files are only downloaded when they are needed as part
10 10 of the current revision. This saves both disk space and bandwidth.
11 11
12
13 Enabling HG Largefiles
14 ++++++++++++++++++++++
15
16 Mercurial Largefiles extension is disabled by default within |RC| Server.
17
18 To enable Mercurial Largefiles Globally:
19
20 - Go to :menuselection:`Admin --> Settings --> VCS`
21
22 - Scroll down into `Mercurial settings`
23
24 - Tick `Enable largefiles extension`
25
26 - Save your settings.
27
28 Those settings apply globally to each repository that inherits from the defaults
29 You can leave `largefiles extension` disabled globally, and only enable it per
30 repository that would use the largefiles.
31
32
33 .. note::
34
35 You might want to adjust the global storage location at that point, however
36 we recommend leaving the default one created.
37
38
39 Installing and using the |hg| Largefiles
40 ++++++++++++++++++++++++++++++++++++++++
41
12 42 To find out more, see the |hg| `Large Files Extensions Documentation`_.
13 43
14 44 To configure the large files extension, you need to set up your
@@ -12,6 +12,7 b' then please send a request to support@rh'
12 12
13 13 deploy-from-host
14 14 hg-large-ext
15 git-lfs-ext
15 16 multi-instance-setup
16 17 scaling-best-practices
17 18 squash-commits
General Comments 0
You need to be logged in to leave comments. Login now