C
C
camradee2018-10-25 15:17:05
git
camradee, 2018-10-25 15:17:05

How to set up Sourcetree to run git on a remote server?

Background:
There is a development server accessed via ssh (putty). Those. there is a certain directory with the project code and git. The code is written in Phpstorm with a deployment SFTP connection. Everything works well - when you save a locally modified file, the latter is synchronized with the server. I can also commit locally and receive changes. The problem is that if you need to download someone's commit, then I will get it locally, but of course it is not uploaded to the server. Of course, you can refuse the local git and do everything on the server, then there will be no problems, but doing everything through the console is inconvenient. For example comparing files. I'm trying to set Sourcetree on the server, but it doesn't work. Would be grateful for instructions or a link to it. I just couldn't find it right away.
PS. The option to create a network drive for the server is not suitable, because the server is far away and there will be friezes.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor, 2018-10-25
@v_decadence

It is unlikely that there is a solution in which it will really be possible to work with remote files through SourceTree.
Questions like this have been asked before, but they didn't offer anything meaningful.
> but it is not uploaded to the server, of course
. What is the problem with getting the commit locally, and doing something like this on the server, which will bring the files to an identical state:

# сброс всех изменений 
git reset --hard &&

# удаление неотслеживаемых файлов и директорий (естественно, не трогаем игнорируемые), чтобы они не мешались при слиянии (они всё равно есть в репозитории)
git clean -fd &&

# обновление без запросов на ввод merge-сообщений
git pull --no-edit

This is provided that the Git repository is on both sides: you and the server.
Thus, you will have the same state of the project and you can work on. Other people's changes will be taken into account there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question