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?
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
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
(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.
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.
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG