|
|
**Git**
|
|
|
-----------------------------------
|
|
|
[Git](https://git-scm.com/) provides a highly efficient open source version control system allowing a synchronisation of a repository with several remote copies (clones), which can be modified simultaneously by different users. Git is the core component of Gitlab and thus of the OpenVT platform.
|
|
|
|
|
|
Both Git and Gitlab are extensively documented, please refer to the [help section](https://virtual.openvt.eu/help) for further reading. In the following, you find a very short getting-started introduction for new users of the OpenVT platform.
|
|
|
|
|
|
**Installing Git on Linux and Windows**
|
|
|
----------------------------------------
|
|
|
If you are using Linux, continue reading here. As a Windows user, check out this page.
|
|
|
|
|
|
**Creating an SSH key**
|
|
|
---------------------------
|
|
|
You should have now a working installation of Git on your system. The default way for secure Git operation on OpenVT is the SSH protocol. Therefore, before you can start creating local clones of OpenVT repositories, you have to create your own SSH key and deposit it on the platform.
|
|
|
|
|
|
Open a terminal (as Linux user) or open the Git Bash app (on Windows). Now, follow the instructions [here](https://virtual.openvt.eu/help/ssh/README#generating-a-new-ssh-key-pair). Use if possible ED25519 keys; in case that does not work, use RSA instead. During the creation, you will be asked to specify a passphrase: please, remember that phrase, it will be your access to secure Git actions later.
|
|
|
|
|
|
**Cloning an OpenVT repository**
|
|
|
--------------------------------------------------------------------------
|
|
|
Now we need to create your first local clone of a Gitlab repository. First, pick a repository on the OpenVT platform that you would like to clone (as a test, you can use the manual_and_guidelines repository, or just start your own private project). Browse to the corresponding repository screen (e.g., [this one](https://virtual.openvt.eu/platform_manual_and_guidelines/manual_and_guidelines)), find the blue "clone" button and copy the link for SSH cloning (the link starts with git@virtual.openvt.eu).
|
|
|
|
|
|
Open a terminal (on Linux) or the Git Bash app (on Windows) and browse to the directory where you would like to place the local clone. Type on the command line prompt:
|
|
|
|
|
|
```bash
|
|
|
cd path_to_clone_directory
|
|
|
```
|
|
|
Note that the path has to be specified Unix style (i.e., with / instead of \ as delimiter). If you would like to create a new directory, type
|
|
|
|
|
|
```bash
|
|
|
mkdir name_of_new_directory
|
|
|
```
|
|
|
and again browse into to that directory using cd.
|
|
|
|
|
|
Now, the actual cloning can happen:
|
|
|
```bash
|
|
|
git clone SSH_cloning_link
|
|
|
```
|
|
|
You should be prompted to enter the pass phrase of your SSH key which you (hopefully) memorised earlier. If the process was successful, the clone of the repository should appear in the current directory, which you can check by typing
|
|
|
```bash
|
|
|
ls -l -tr
|
|
|
```
|
|
|
which shows you a list of all files and subdirectories in that directory in reverse time order. The clone should be shown as directory on the bottom of the list with the same as the cloned Project. You can now work with these files in this folder like with any other file on your computer.
|
|
|
|
|
|
|
|
|
|