Question regarding... SourceTree and git are installed on the local mac machine, however I am connecting and using network space on a (webDAV or an AFP) home server. I would like to know if bitbucket works better with webDAV or AFP. or if it works at all?
Community moderators have prevented the ability to post new answers.
git can in theory work over standard network shares, but it is not as reliable that way and I would personally not recommend it. If you want to have a home server with a copy of your repository on it, the easiest way is either to just use SSH (even most shrink-wrapped NAS units like Synology/QNAP support enabling an SSH service), or to use a system like gitosis or gitolite (Google them :)). Synology has a gitosis package you can install via ipkg, and if you have a Linux box it's extremely easy to install. You then just push the commits to this server just like you push to BitBucket over SSH.
About your commits in SourceTree not showing up on BitBucket, remember you have to push your commits before they will appear. Git commits locally, so until you push those commits, they're only on your local machine.
About setting up a post-receive hook on Bitbucket, there's a limited number of scripts you can set up there. You might prefer to do it just by deploying via push to your deployment servers as and when you want to deploy a version. If you want to automate it further, it's probably better to do it on your own server where you have full scripting flexibility.
"about your commits in sourcetree not showing up on bitbucket"...
when i connect to the nas via webdav it seems to work (with 1 issue that I'll get to in a second).
However, when I connect to the nas via afp it gives me an error when trying to stage files... (see attached)
AND... when I connect via webdav or afp, i have hidden files that also appear, (see attached). all files will show 2 versions... "._filename.html" and "filename.html"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, this is basically the kind of thing I was talking about when using git across network shares, it's generally not a good idea. Git uses filesystem features which aren't always supported via network shares, it's best not to try it. Worst case I've seen is a complete repository corruption because of a SMB share - just use a local repository and push to remotes via the 'proper' routes like SSH/HTTP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@steve, Thanks!
Any knowledge on the the Lacie 5Big?
1. Is connecting via AFP any better? and can it then be used as a repo and pus as if it was a remote repo?
2. And, what are the limitations on the post-receive hook to push to Bitbucket?
3. Currently (while not even using it as a centeral repo) After doing a git log i often get the "unable to write to index file".
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wouldn't recommend using a remote share as a full working copy under any protocol, there's too much potential for weird errors & corruptions because of interruptions, and it's sacrificing a lot of the speed of a DVCS. By all means use them as remotes though, in that case the protocol matters less.
Bitbucket doesn't allow arbitrary post-receive hooks, but it has a lot of options in the service integration section in admin that you can use to trigger pretty much anything. Here's an article you might find useful: http://brandonsummers.name/blog/2012/02/10/using-bitbucket-for-automated-deployments/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for a great response.
My home server is a Synology NAS. I'd like to keep the NAS as the development server, that way i can make multiple small changes to my files on the development server without needing to commit every little change to preview in the browser via dev.website.com. I am able to share my development server with clients, for approval purposes. I would not be able to do this on my local machine, also dont want my local machine with 30+ full copies of wordpress, I'd like the NAS to handle these files.
Hmm, I'm at a workflow stand-still trying to wrap my head around what's possible, and more certainly... What's possible in my certain case. For instance In addition I need a solution that allows me to use a GUI interface as I've read up/studied how git works but I can't stand terminal or any command line use.
Things I need:
Use sourcetree (or other git gui) for all git work.
Share development server with client. (clientwebsite.myserver.com)
Something to allow me to take this development version (Without SSH) and push to a live server (clientwebsite.com) so if this means pushing to something like bitbucket that can handle the POST script that would be ideal.
Could you provide any knowledge or suggestions based on this feedback? I feel there are a million workflows that "could" work I'm just not aware of other options. Thanks, Aaron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to see the files on your local NAS box without committing, I'd suggest using a simple sync approach. You could either do it with rsync, or you could make it happen automatically using Synology's CloudStation: http://www.synology.com/dsm/home_file_sharing_cloud_station.php
For deploying to a client site, I think rsync is likely to be best (even if you don't like the command line, you can figure out the rsync command once and then bind it to a Custom Action in SourceTree so you don't have to think about it). If the client site is only available over WebDAV then maybe use a tool that specifically supports WebDAV file sync, there are a few out there when I searched such as GoodSync.
You can definitely deploy using Git but generally you need the server end to be Git-aware. And of course you have to commit before you can do that so the sync option is better if you want to look at it on your dev server in real time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Very interesting... so for this case I would need git installed on the NAS? The client server "should" always have git capabilities so that shouldn't be a problem.
I could deploy from either the local or the nas since they are synced? If I could deploy from either then I wouldn't technically need git installed on the nas (dev server) because the local machine could do it? So at that point the only condition not met is the "not have 30+ full copies of wordpress installed on my local machine" but I guess if I get a good workflow this can be overlooked. Pretty sure the mac can handle it. ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't need Git installed if you're just syncing via rsync or CloudStation. In fact, it would be better to exclude the '.git' subfolder from the sync so you don't clutter the server with the git repo as well as the files if you're just doing a file-based sync.
As for whether you can deploy from the server, it depends how you deploy. If you use Heroku or similar, then you can only deploy from a git repo on a machine that can 'git push'. If you deploy just by uploading files, then you can just rsync or other simple file-based upload from either your local machine or the server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.