2

I'm trying to leave the stone ages and integrate version control into my workflow, but I'm a total VC noob. I have an account with Bean Stalk, added a remote git repository there, and have successfully initiated the local git repo in Coda 2. I'm also setting up a local dev environment where I can run MAMP Pro and use thedomain.dev on my network to develop locally. The end game is to code away locally, using the local git repo, and then when I'm satisfied, pushing (correct term?) to the remote repo, which would then upload those files to the staging domain, hosted on a remote server. My old workflow involved editing files directly on the server, which is horrible. So, I am trying to do things the right way.

I cannot find any good resources on how to do this. Again, my local git repo is working just fine. However, I want to be able to push those changes to the remote repository in Coda 2. The "Source" tab in the edit sites panel only has "local" in the dropdown and I can't change anything in it, can't figure out how to do it and can't find much help on Google.

Any thoughts? Is this even a good strategy? I'm open to suggestions, because I'm trying to find a better workflow than editing files directly via SFTP.

Thank you!

john.w
  • 323
  • 4
  • 13

1 Answers1

2

I believe, if you set up a repo from scratch in Coda you need to use the terminal to add the remote path. Open a Terminal tab and paste in whatever Beanstalk is telling you for 'Adding an existing repo' or something along those lines. It will be something like: $ git remote add origin git@<username>.beanstalkapp.com:/<repo>.git. After you do that, to Push to that repo you can use the Push button at the bottom of the Source tab.

As far as processes go, what you're doing with Beanstalk is probably the "simplest", that is, it is probably the one with the least amount of time required on the command line or installing software on your server. I would say the next step would be deploying straight to the server by setting it up as a git remote. You could then SSH in to the server and pull changes directly. After that you have tools like Fabric and Capistrano which automate the process.

Kinsa
  • 686
  • 8
  • 14
  • OK, using terminal tab. Duh, why did I not think of that. What would your thought be on setting up a git hook that would upload a checkout of the repo to the server, free of any git files? Or is that what Capistrano would do? – john.w Nov 09 '12 at 16:05
  • Have you had much experience with bitbucket.org as a git repo management tool? – john.w Nov 15 '12 at 20:06
  • I've used bitbucket.org extensively as a remote Git host. It works well but lacks the deployment tool that you are referring to that Beanstalk provides. I don't believe you could setup a git hook the way your talking about. The git files have to be on the server, what the git hook would then do is something like restart the server when it detects a push. Here's some documentation on server-side hooks: http://git-scm.com/book/en/Customizing-Git-Git-Hooks#Server-Side-Hooks. Capistrano would probably do what you're asking. – Kinsa Nov 16 '12 at 18:30
  • Future Johnathan here, thought I'd chime in and say that I've found BitBucket works extremely well with http://www.deployhq.com/ and does exactly what I was wanting to achieve at a pretty low cost. I'm sure Capistrano would work well, but was wasting a lot of time trying to get it to work, and Deploy is just too easy. – john.w Mar 14 '14 at 19:42
  • Hey John, did you manage to use Github and Coda 2? I'm looking in to this now :) – Jordan Miguel Jun 05 '20 at 16:21