I want to push my changes to a folder on a remote server. I can even do a map drive to it. Wish there was a folder browser (the same as choosing where to create repo) where I can select the server folder I want to push to. Since there isn't I know I have a syntax error here.
Adding a remote has nothing to do with the physical remote itself. It is only for management of references to remotes themselves.
That being said, it sounds like you want to use Git to deploy to a server. You can use pushing of a branch to attain this. However, you first must have the remote setup via running this on the server
git clone --bare //path/to/your/repo /some/dir/on/the/server/.git
Now you must add a hook to this repo to fire every time you push to a branch. Within this hook you would:
git --git-dir=/some/dir/on/the/server/.git --work-tree=/where/to/deploy/to checkout deployment-branch -- .
You'll have to google git update hook
to get the few lines of code needed to wrap the above line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With