joomlavast.blogg.se

Git add remote to existing project
Git add remote to existing project







git add remote to existing project

Next to it there's a yellow ball and 'Authentication required'.

  • Try Source Control -> Push and Xcode 4 pops up the remote Repository dialog again but this time has detected a remote Repository called origin.
  • Try Source Control -> Push and Xcode 4 fails with 'The operation could not be performed because access to the repository RepositoryName was denied.
  • Do initial commit to local Git repository.
  • Create a New Project within the directory you just cloned into but DO NOT tick the 'Create local git repository for this project' option.
  • git add remote to existing project

  • There is now a new Repository defined in the Organizer window with its origin set to the GitHub remote SSH URL.
  • 1st attempt appears to fail even though contents are downloaded.
  • Give it a name ( RepositoryName)and Clone to a directory.
  • 'Connect to a repository' from Welcome to Xcode dialog.
  • As such I think you're better off with the following steps, bearing in mind there still seem to be some Xcode 'gotchas' in this solution. This example only really applies to the first project you're adding to a GitHub repository. EDIT WITH FURTHER DETAILS OF ONE WORKAROUND So maybe starting from absolute scratch with Xcode 4 creating the repository for me isn't the best pattern (until they improve the Git tooling in a later version of Xcode 4). If I clone an existing GitHub repository with an Xcode project in it, open it with Xcode 4 then even though the first Push seems to fail, the 2nd push did then work. Has anyone found a reliable way of using Xcode 4 with GitHub starting with a local project first? If I restart Xcode an origin repository has been added to the Repositories browser in Organizer and I can see the master branch on GitHub so I know the credentials are right without me changing anything.

    git add remote to existing project

    #Git add remote to existing project password

    When I enter my password Xcode 4 then crashes with the following error ASSERTION FAILURE in /SourceCache/IDEKit/IDEKit-303/Framework/Classes/SourceControl/IDESourceControlOperationInfo.m:59ĭetails: Message sent to invalidated object. However when I click 'Push' and it tries to push the changes it says "The operation could not be performed because access to the repository 'origin' is denied."Ī dialog prompting me for my username and password then appears with my pre-filled out so it must be reading this correctly from the local repository's config. There's a yellow indicator saying that Authentication is required, which is fine as I've not been able to enter my credentials yet for HTTPS. dialog appears listing the origin remote repository. Then the Choose the repository to which to push changes. git remote add origin I then go back to Xcode 4 and try to use So I switch to using git commands in Terminal. I can add a GitHub repository to Xcode 4 as a new Repository in the Organizer window but there's no method of setting it as a remote repository for my existing project. When I want to push the new project to GitHub I want to add a remote repository and push my local changes up to GitHub. If I create a new Xcode 4 Project and accept the option to create a local Git repository, all is well. The Git integration in Xcode 4 is very welcome however it seems to be a bit flaky when it comes to dealing with remote repositories.įor clarity I'm using OS X version 10.6.7 and Xcode 4.0.2 (4A2002a).









    Git add remote to existing project