Git - basics of working with git on a server

Git - basics of working with git on a server

In the previous article , we showed the absolute basics for working with git locally. Now let's look at placing the current git repository on the linux server, cloning the project on the local station and how to upload the changes back to the server.

This article assumes that you have a Linux server on your network that you have root access to via SSH and that has git installed. For work, it is advisable to create, for example, a git user ( adduser git ) on the server.

# We will go to our local project (git repository) and create a clone
1.) git clone --bare .git project.git

We will upload the # project.git to our server
2.) rsync -av /tmp/project.git/ git@192.168.17.111: /var/git/project.git

#for further development of the project we have to download the clone back to the local from the server
3.) git clone git@192.168.17.111: /var/git/project.git

#we make the necessary changes to the project and commit as before
# changes must then be uploaded to the server in the central git repository
4.) git push origin master

#if we work on multiple workstations or with multiple developers,
#then you need to download the current version of the project
5.) git pull
If more than one developer is working on a project, you need to know the basics of branching and merging in git, but read about it in the documentation.

Související obsah

git

dev

linux

terminal

Komentáře

Vaše reakce na Git - základy práce s gitem na serveru

Reference

Podívejte se na naše reference

Prohlédnout

Aplikace

Podívejte se na naše aplikace

Prohlédnout

Co umíme?

Podívejte se co umíme

Prohlédnout

Co umíme?

Vytváříme sofistikované aplikace pro náročné

Od webových aplikací přes android až po převodové můstky či složité informační systémy.

Podívejte se k nám

Máte ještě čas? Podívejte se na další rubriky

Tento web používá soubory cookie. Dalším procházením tohoto webu vyjadřujete souhlas s jejich používáním.. Více informací zde.