Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to sync Pulled file updates to a mounted remote server?

Deleted user August 5, 2015

I use ExpanDrive 3 to mount a remote server (within my LAN) which mounts it as a drive letter on my Win 7 PC. My git repo is local on my C drive. Whenever I do a Pull request to my git repo, I'd like a way to have that trigger a file sync of just the files that were affected in that Pull to that mounted server file structure.

I use SublimeText 3 with a plugin for file sync but I have to know the files to sync or select a parent folder to sync (which again requires that I know where each pulled file lives). If the pull includes files modified all over the source code tree, it may require sync'ing the entire project which is quite time consuming given the project size.

I would really prefer to surgically update just the pulled files. Is there a way to do that within SourceTree?

3 answers

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2015

If you make the copy on the network drive a proper Git clone (i.e. to have the .git folder as well, not only the files of the repo), you can write a one-line script that does a

git pull

(either from the server or from your C drive). This can either be triggered by the scheduler or by a hook in the clone on your C drive. The easiest is probably to just set it to run every minute and forget about it.

Deleted user August 6, 2015

Thanks for that great suggestion, Balazs. I didn't mention previously that the remote server is a Linux server and the apps represented there get deployed now and then as new versions become available, via an automated deployment process. That deployment is manually triggered so obviously the need to deploy the newest version of the apps wouldn't be totally necessary if I turned the file structure into a .git repo as you suggest. I would have to determine if Git can be installed on that server, a server our group doesn't manage, only uses and has access to our specific container on the server. It all may be doable but it may be easier to see if a file sync app exists that could achieve syncing the files external to SourceTree in an automated fashion.

0 votes
Deleted user August 5, 2015

Thanks, Seth. I'll have a look at Git Hooks. If anyone else knows of a way to do it in SourceTree, please let me know. Atlassian, maybe this feature could be added to the suggestions list?

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2015

Probably not. SourceTree does little more than provide a GUI for existing git commands. I think you'll have to go to the command line for this, but git hooks might provide what you need: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events