##// 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.
@@ -1,39 +1,69 b''
1 .. _hg-big-files:
1 .. _hg-big-files:
2
2
3 |hg| Large Files Extension
3 |hg| Large Files Extension
4 ==========================
4 ==========================
5
5
6 Large files, such as image or zip files can cause a lot of bandwidth overhead
6 Large files, such as image or zip files can cause a lot of bandwidth overhead
7 during clone, push, and pull operations. To remove this inefficiency, |hg|
7 during clone, push, and pull operations. To remove this inefficiency, |hg|
8 has a large files extension which tracks their revisions by checksums. This
8 has a large files extension which tracks their revisions by checksums. This
9 means that the large files are only downloaded when they are needed as part
9 means that the large files are only downloaded when they are needed as part
10 of the current revision. This saves both disk space and bandwidth.
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 To find out more, see the |hg| `Large Files Extensions Documentation`_.
42 To find out more, see the |hg| `Large Files Extensions Documentation`_.
13
43
14 To configure the large files extension, you need to set up your
44 To configure the large files extension, you need to set up your
15 :file:`~/.hgrc` file.
45 :file:`~/.hgrc` file.
16
46
17 1. Open your :file:`~/.hgrc` file.
47 1. Open your :file:`~/.hgrc` file.
18 2. Add ``largefiles =`` to the ``[extensions]`` section.
48 2. Add ``largefiles =`` to the ``[extensions]`` section.
19 3. Configure the ``[largefiles]`` section with the patterns and file size you
49 3. Configure the ``[largefiles]`` section with the patterns and file size you
20 wish |hg| to handle as large. The ``minsize`` option is specified in
50 wish |hg| to handle as large. The ``minsize`` option is specified in
21 megabytes.
51 megabytes.
22 4. Save your changes.
52 4. Save your changes.
23
53
24 .. code-block:: ini
54 .. code-block:: ini
25
55
26 [extensions]
56 [extensions]
27 hgext.churn =
57 hgext.churn =
28 largefiles =
58 largefiles =
29 rebase =
59 rebase =
30 record =
60 record =
31 histedit =
61 histedit =
32
62
33 [largefiles]
63 [largefiles]
34 patterns = re:.*\.(png|bmp|jpg|zip|tar|tar.gz|rar)$
64 patterns = re:.*\.(png|bmp|jpg|zip|tar|tar.gz|rar)$
35 minsize = 10
65 minsize = 10
36
66
37 For a complete :file:`~/.hgrc` file example, see :ref:`config-hgrc`.
67 For a complete :file:`~/.hgrc` file example, see :ref:`config-hgrc`.
38
68
39 .. _Large Files Extensions Documentation: http://mercurial.selenic.com/wiki/LargefilesExtension
69 .. _Large Files Extensions Documentation: http://mercurial.selenic.com/wiki/LargefilesExtension
@@ -1,26 +1,27 b''
1 .. _rc-tutorials:
1 .. _rc-tutorials:
2
2
3 |RCE| Tutorials
3 |RCE| Tutorials
4 ===============
4 ===============
5
5
6 The following tutorials are aimed at helping you to deploy |RCE| in various
6 The following tutorials are aimed at helping you to deploy |RCE| in various
7 different ways. If you would like to see a certain scenario documented,
7 different ways. If you would like to see a certain scenario documented,
8 then please send a request to support@rhodecode.com
8 then please send a request to support@rhodecode.com
9
9
10 .. toctree::
10 .. toctree::
11 :maxdepth: 1
11 :maxdepth: 1
12
12
13 deploy-from-host
13 deploy-from-host
14 hg-large-ext
14 hg-large-ext
15 git-lfs-ext
15 multi-instance-setup
16 multi-instance-setup
16 scaling-best-practices
17 scaling-best-practices
17 squash-commits
18 squash-commits
18 squash-commits-git
19 squash-commits-git
19 rebase-commits
20 rebase-commits
20 rebase-commits-git
21 rebase-commits-git
21 api-examples
22 api-examples
22 merging
23 merging
23 branching-vs-bookmarking
24 branching-vs-bookmarking
24 windows-to-linux
25 windows-to-linux
25 dvcs-best-practices
26 dvcs-best-practices
26 appenlight-setup
27 appenlight-setup
General Comments 0
You need to be logged in to leave comments. Login now