Loading...
Help

Activation and first use of Git on Blueboard.cz hosting


Activation on hosting

Git is activated in Administration → My domains → select domain → Git.

You need your public ssh-rsa key to do this, which you enter into the form here and then activate Git with the Activate Git button.

Settings on your computer

There are two options here. Either you already have a repository on your machine and just want to push to us, or you don't have anything yet and want to set one up.

I don't have a repository on my computer yet

To set up a repository on your machine, we'll use the clone command, which clones the repository from the hosting to your machine and directly sets up our hosting as a remote repository (remote) for you to push to.

Clone the repository with the master branch that we automatically set up on your hosting when you activated Git to your computer using this command:

git clone git@www.mojedomena.koncovka:mojedomena.koncovka

(note, if you have new hosting and the domain does not yet point to us, you must use a temporary name based on the server the domain is on, for example: git@neuron.blueboard.cz:mojedomena.koncovka)

Cloning has created a repository folder on your computer.

I already have the repository on my computer

Activating this will create a master repository on the server, which you should set up as a remote repository. You can choose the name. If you want our hosting to be the master repository for you, choose the name origin, but feel free to choose the name blueboard. You do this with the command

git remote add origin git@www.mojedomena.koncovka:mojedomena.koncovka

(note, if you have new hosting and the domain does not yet point to us, you must use a temporary name based on the server the domain is on, for example: git@neuron.blueboard.cz:mojedomena.koncovka)

Push to hosting and deploy

In the repository folder on your computer, you can try creating a test.txt file and commit it:

$ git add test.txt
$ git commit -m 'first commit'

Now the file is committed to the local git and we want to push it to the server. If we push it to the master branch…

git push origin master

… will be hosted by us, but not uploaded to production. If you push it to the production branch…

git push origin master:production

(the master:production entry means we are pushing from the local master branch to the remote production branch)

… right after the push, we'll automatically upload it to FTP and it will be available on the web. Sometimes this is called deploy.

Composer

You can also use the automatic packaging system „Composer“ on our hosting:https://getcomposer.org/. After each push, a special composer install --no-dev command is called, which downloads and installs the necessary dependencies directly on the server based on the composer.lock file.

© 2001-2024 Blueboard.cz s. r. o.