/builds/gitlab-kitware-sciviz-ci/Documentation/dev/git/download.md
Go to the documentation of this file.
1 Download ParaView with Git
2 ==========================
3 
4 This page documents how to download ParaView source code through [Git][].
5 See the [README](README.md) for more information.
6 
7 [Git]: http://git-scm.com
8 
9 Clone
10 -----
11 
12 Optionally configure Git to [use SSH instead of HTTPS](#use-ssh-instead-of-https).
13 
14 Clone ParaView using the commands:
15 
16  $ git clone --recursive https://gitlab.kitware.com/paraview/paraview.git ParaView
17  $ cd ParaView
18 
19 Update
20 ------
21 
22 Users that have made no local changes and simply want to update a
23 clone with the latest changes may run:
24 
25  $ git pull
26  $ git submodule update --init
27 
28 Avoid making local changes unless you have read our [developer instructions][].
29 
30 [developer instructions]: develop.md
31 
32 Release
33 -------
34 
35 After cloning your local repository will be configured to follow the upstream
36 `master` branch by default. One may create a local branch to track the
37 upstream `release` branch instead, which should guarantee only bug fixes to
38 the functionality available in the latest release:
39 
40  $ git checkout --track -b release origin/release
41 
42 This local branch will always follow the latest release.
43 Use the [above instructions](#update) to update it.
44 Alternatively one may checkout a specific release tag:
45 
46  $ git checkout v4.3.1
47 
48 Release tags never move. Repeat the command with a different tag to get a
49 different release. One may list available tags:
50 
51  $ git tag
52 
53 and then checkout any tag listed.
54 
55 Use SSH instead of HTTPS
56 ------------------------
57 
58 Git can be configured to access ``gitlab.kitware.com`` repositories through
59 the ``ssh`` protocol instead of ``https`` without having to manually change
60 every URL found in instructions, scripts, and submodule configurations.
61 
62 1. Register [GitLab Access][] to create an account and select a user name.
63 
64 2. Add [SSH Keys][] to your GitLab account to authenticate your user via
65  the ``ssh`` protocol.
66 
67 3. Configure Git to use ``ssh`` instead of ``https`` for all repositories
68  on ``gitlab.kitware.com``:
69 
70  $ git config --global url."git@gitlab.kitware.com:".insteadOf https://gitlab.kitware.com/
71  The ``--global`` option causes this configuration to be stored in
72  ``~/.gitconfig`` instead of in any repository, so it will map URLs
73  for all repositories.
74 
75 4. Return to the [Clone](#clone) step above and use the instructions as
76  written. There is no need to manually specify the ssh protocol when
77  cloning. The Git ``insteadOf`` configuration will map it for you.
78 
79 [GitLab Access]: https://gitlab.kitware.com/users/sign_in
80 [SSH Keys]: https://gitlab.kitware.com/profile/keys