There is server A, a local git is deployed on it. If I try to send changes from my computer to this server, then the information about the change comes: there is a comit entry in git log, but the changes are not applied.

those. If I changed the file A, which was in gita, adding a line to it, made a commit and sent it to a remote server. on the remote server, git log has my commit, git status displays this file with the modified mark, the contents of the file are the same as before the commit.

When pushing, commite, etc. No errors, says that everything is fine

  • Yes, I forgot the question, what could be the problem, how to do it, so that the changes would be automatically applied during the committee? - Dezer
  • In your scheme in any way. For it is a crutch. working dir will not change. It is necessary to do pull / checkout on the server - KoVadim
  • Maybe you can write some kind of hook? Just an idea that the main site is located in the external environment, at the hosting provider, and git on the server on the local network, without access to the external environment. - Dezer
  • one
    sure you may. Only on the server you need the so-called bare repository (you can of course without it, but not necessary). and the right hook that will download and deploy. - KoVadim

1 answer 1

The following lines should be added to the configuration file: [receive] denyCurrentBranch = updateInstead Works from version 2.3, allows you to push to a "local" turnip, without any crutches.