Document toolboxDocument toolbox

How to setup git on the server via terminal

 

git clone is a Git command line utility which is used to target an existing repository and create a clone, or copy of the target repository. 

Before you start to use git, make sure the server has access rights to your companies repository.

On the server folder user must run following command to initialise git repository:

git clone https://server_address:port/repository/location git

 

This will create a folder git with the code of the needed branch in it. You can then create symbolic links from HansaWorld server to these specific subfolders of halcust etc.

To make sure you are using correct branch, type:

git branch

It will show currently selected branch with *

To switch to develop branch use:

git checkout develop

 

To refresh code later on user need to run command:

git pull

If you wish to use a non-standard ssh key e.g. git_rsa instead of id_rsa then you need to specify that in your ssh config file:

[root@hansa git]# cat ~/.ssh/config
Host services.burti.lv
User git
IdentityFile /root/.ssh/git_rsa