Pushing to Remote Repository from Xcode: no remotes found (Solved)

Uncategorized No Comments »

When adding remote repositories to your projects in Xcode you might find that you are unable to push to the remote repository depending on how you have set the remote repository up.

In my situation I have set up my own git repository for a few reasons:

  • Because I can
  • To learn more about git
  • To have my projects backed up remotely
  • To have a private solution I control
  • There is no additional cost for the above benefits

I opened Xcode and selected the second option on the welcome splash screen ‘Connect to a repository’ and entered my git server and project details. Xcode kindly created a local version on my hard drive and I was content to code away and make commits as usual.

That was all fine and dandy but I noticed a problem when I wanted to sync with the original ‘remote repository’.

So I was expecting to go:

File > Source Control > Push

and the dialog comes up as expected but it says no remotes found.

Read the rest of this entry »

GIT from command line (Xcode Installed)

Uncategorized No Comments »

If you’ve installed a reasonably recent version of Xcode on your mac then it will have git repository features included but by default you will not be able to use the git from the terminal (command line).

Xcode will place git here:

/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/

To be able to use git from the command line then you need to add this directory to your PATH variable.
You will need to open the terminal and edit your bash profile (or whatever shell you’re using’s profile).

Add the following statement to your .bash_profile and save it…

export PATH=”/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/”:$PATH

You will need to open a new tab in the terminal or quit and re-open the terminal in order for the change to take effect. Alternatively you can use the following command…

user $ source ./bash_profile

Now you will be able to use git commands in any terminal window.

Credit where credit is due this information was adapted from git-from-command-line-after-installing-xcode-on-os-x-lion.

WP Theme & Icons by N.Design Studio | Akismet has gobbled 335,630 spam comments...Mmmm Tasty :-)
Entries RSS Comments RSS Log in