Git is new here. Is there a way to synchronize the two repositories, so that the current checked files will be the latest version of all the changes?
What I have:
Desktop Server ------- ------ Change_X Change_Y
And I would like to introduce some “magic” command, and then the changes will be merged
Desktop Server ------- ------ Change_X Change_X Change_Y Change_Y
One of the problems is that the desktop is a Windows machine behind NAT, and I would like for me to not have sshd settings. Basically, I would like to do all this using ssh from the desktop to the server.
It seems like this should be trivial with git, but I couldn't figure out how to do this.
(I thought git push would do the trick, but it turns out that it does not make changes to the current branches, so changes from the desktop do not get to the server)
Is there a way to do this with git, or am I disconnected from the track?
Solution: I downloaded the post-update script from here and put it in the hooks directory on the server, and now git push forces the server to update with the changes. Therefore, basically the “magic team” decides:
git pull server:scripts/ master git push server:scripts/
( scripts is the folder I'm syncing to)
source share