Question

I’m new to working with Git and managed it in the end to install it (Mac Mountain Lion, Git Installer from Google).

I activated it for my website in Coda2 and made a few tests. I have the SCM tab, which seems to work (add and commit), but when I try to compare, I get the list of my test revisions, but the compare button does nothing. And the push and pull buttons in the SCM tab are always grey (not active).

The Terminal says Git is in /usr/local/git/bin/git but e.g. the git --man-path is in /usr/local/git/share/man. Is that correct? May this be the cause for Git not working properly in Coda2?

And one last question: How do I change the repo in Coda from local to e.g. BitBucket? There seems to be no way to edit the URL (deactivated after setting up local).

Would be nice if anyone had answers to this, because I haven’t found anything on the web. Thanks!

Was it helpful?

Solution 2

Right now the push and pull buttons are gray because Git can work locally, without a remote host (you don't have to use Bitbucket or any other remote host with Git, you can run it all locally, I recommend reading up on that here if you want more info: http://gitref.org/remotes/). There seems to be a bug if you want to call it that in Coda where you can't edit the repository URL or add remotes once it's been set except by doing so via command line.

So, if you choose the Initiate Empty Git Repository option when you setup the site rather than cloning from Bitbucket you're stuck with it unless you jump into the command line.

That being said. The workaround, if you'd rather use a remote Git repository than a local one is to set it up remotely first (so login to Bitbucket, create a repo, then start a new site in Coda and on the SCM tab choose Clone Git Repository rather than Initialize Empty Git Repository and you'll be setup I think the way you want to be.

If you do jump into the command line and add a new remote, on the Source tab when you're setting up or editing the site is an option for Local and origin or whatever you named the remote (the Git default name is origin).

Regarding your issue with comparing, I'm guessing here, but if you haven't made any commits yet there probably isn't anything to compare to. Although your new files should be listed, probably with an Add button next to them. Add, Commit and then make more changes and you should be able to compare.

Finally, with regards to the location of Git, so long as its registered in the terminal window, you're all good. If you can execute $ which git (without the dollar sign) in a bash window and get a response that points to a path the system knows where Git is.

OTHER TIPS

I don't know anything about coda, but if you want to change your repo from "local" to having a bitbucket repo as remote, you could just add the bitbucket repo as a remote

cd /path/to/my/repo
git remote add origin ssh://git@bitbucket.org/yourbitbucket_name/repo_name.git
git push -u origin --all   # to push up the repo for the first time
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top