Coda2 and Git: Git work, but there is no comparison, click or drag

Im new to working with Git and running it at the end to install it (Mac Mountain Lion, Git Installer from Google).

I activated it for my site in Coda2 and did some tests. I have a SCM tab that seems to work (adds and commits), but when I try to compare, I get a list of my test revisions, but the comparison button does nothing. The push and pull buttons on the SCM tab are always gray (inactive).

The terminal says that Git is in / usr / local / git / bin / git, but, for example, the Git --man path is in / usr / local / git / share / man. It's right? Could this be the reason that Git is not working properly in Coda2?

And the last question: how to change the repo in Coda from local to, for example, BitBucket? There seems to be no way to edit the url (deactivates after setting local).

It would be nice if someone had the answers to this, because I did not find anything on the Internet. Thanks!

+4
source share
2 answers

The push and pull buttons are gray at the moment, because Git can work locally, without a remote host (you do not need to use Bitbucket or any other remote host with Git, you can run it locally, I recommend reading here if you want more information : http://gitref.org/remotes/ ). It seems that there is an error if you want to call it that in Coda, where you cannot edit the repository URL or add deleted objects after installing it, except that you do it through the command line.

So, if you choose the Initiate Empty Git Repository option when setting up the site, rather than cloning with Bitbucket, you are stuck with it unless you go to the command line.

It is said. The workaround, if you would rather use a remote Git repository than a local one, is to configure it remotely first (so go into Bitbucket, create a repo, then launch a new site in Coda and on the SCM tab select Clone Git Repository instead of initializing Empty Git repository, and you will be tuned in. I think you want to be.

If you go to the command line and add a new remote, on the "Source" tab, when you set up or edit the site, there is the option "Local" and "source" or what you called remote (Git default name is the origin).

As for your problem when comparing, I assume that here, but if you haven't committed any commits yet, there may be nothing to compare. Although your new files should be listed, perhaps the Add button next to them. Add, Commit, and then make additional changes, and you can compare.

Finally, as for the location of Git, as long as it is registered in the terminal window, you are all right. If you can run $ which git (without a dollar sign) in a bash window and get an answer pointing to a path that the system knows where Git is.

+1
source

I don't know anything about the code, but if you want to change your repo from "local" to the bitbucket repository as remote, you can simply add the bitbucket repository as 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 
+2
source

Source: https://habr.com/ru/post/1484050/


All Articles