Remove svn repository associated with ios project in XCode - ios

I'm a little bit confused with Xcode 5 Source Control options. I recently downloaded a project from Internet. That project had an svn repository associated and now I want to commit this project to one git repository hosted at bitbucket.
The problem is that I'm not able to see where is the option or what do I have to do to delete the association between the svn repository and the project. In the same way, I don't see where can I associate my bitbucket repository with the project.

I will answer myself. First of all I deleted the .svn folder inside my project, after that I opened a terminal, I went to my project folder and I entered:
git init
git add .
git commit -m "first commit"
After these steps I was able to upload the project to one bitbucket repo =)

Related

Why not appear the files in submodules added into my Xcode project?

I have a problem with my Xcode project. I'm using submodules of frameworks like alamofire. I added this following the github steps... running the following command:
$ git submodule add https://github.com/Alamofire/Alamofire.git
and then the next step like drop into project...
But my problem is then the commit and push. When I clone the project from git using sourcetree in other computer or I remove the repo and I download this, the folder of alamofire and others sdk are empty.
If I open the xcode project is red name, because haven't the files. But in my first local repository all work and if I try change to submodule in sourcetree the files are downloaded and appear.
But if I use:
git clone --recursive https://github.com/meme/myRepo.git FOLDER_NAME
with this command all files are downloaded.
I want get the content of those submodules when I clone my repo into a computer with sourcetree.
How can I solve this to then download the repo appear directly the sdks?
As illustrated in this thread:
There is a "Recurse submodules" option when cloning under "Advanced Options".
That should be enough for your original question.
However:
nothing when pulling, checking out, or switching branched; and no manual recursive submodule update functionality.
So:
The only way I know of updating submodules in SourceTree is to manually open each submodule (and recursively open each nested submodule) and look at the "Uncommitted changed" select only submodules that appear to have change and "Reset" the changes.

Integrate Projects in a single project

I have same xcode project on two deferent macbooks with different code.we need to merge that code but we are not using any git account.We need to merge same file as well,I mean we have same viewcontroller and added two people add a code in single view controller How i can merge it.
For example:
I have a view controller Name "XYZ"and Person 1 added "Login Method"
into "XYZ" and person 2 added "Sign up Method" into XYZ. and both code
are on deferent macbook without any git account how I can merge
that.
Since you use the git tag, I will provide the way to do version control by git.
First, please sign up account for bitbucket (free for private repository) or github (only free for public repository). And create a repository. They are as the remote git repository(repo).
Then use git bash for local repository.
In one macbook, use these steps:
git clone <URL for your bitbucket or github repo>
cd reponame
copy your xcode project in reponame folder
git add .
git commit -am 'code version from first macbook'
git push
Now the code in the first macbook is pushed in your remote repo.
In the other macbook, use these steps:
In an empty folder, use git init
copy your xcode project in this folder
git add .
git commit -am 'code version from second macbook'
git remote add origin <URL for your bitbucket or github repo>
git pull origin master
Now the code from macbook1 is merging in macbook2
If there has conflict files, you should check and save them, and then use git add . and git commit -m 'solve merge conflict'.
Now this is the version that you merge the different macbooks together. You can push the version in remote repo by git push.
More git related, you can refer git book.
Any version control system comes to handy in this kind of situations. Merging manually is the option available other than version control system. Either merge using version control system like git or manually merge the files which is very hard to workout.

Question marks in project navigator Xcode 5

i just updated to Xcode 5 and my project is using GIT, after update completed suddenly question marks appear in project navigator file near each file.
when i am trying to Commit i don't see what files have been changed, i cannot pull also
and when i am trying to push it gives :Push Success" message but the repository on GitHub don't updated.
You probably did not set up your git repository properly. There are ways of adding external git repositories, but they tend not to work well for github (in my experience) and always lead to these sorts of issues.
If you want to set up a remote git repository through github on XCode these are the steps you should take.
Make the repository on github. Make sure to add the .gitignore file for Objective-C.
Clone the repository.
Go to XCode, press "create new project"
Create the project in the folder you cloned the repo to. I always name it the exact same thing, but I don't know if that is necessary.
Make sure not to select create local git repository.
This will definitely create a project that is under version control by a remote git repository hosted on github.
Quick fix is to Create or Save the new project 'outside' the directory (say Desktop) that is not linked to your github/bitbucket

Xcode change repositories

Maybe anyone knows a way how to change repositories.
I have to continue a project made by other company, and they have their svn repository in their server. I'v created my own git repository, yet the files keep commiting to the old svn. Deleting the first repository in organizer does not help at all, if i try to commit file, it recreates...
So how do I switch between old svn to my new git repository ?
close XCode, go into the terminal and delete all the .svn directories from the folder hierarchy, issue "git init ." in the root directory and now restart XCode.

Merging two git repositories (accidentally downloaded .zip from github, need to merge back in)

Ok so I have an iOS project I'm tracking with git / github.
I downloaded a copy of the master branch (.zip format), and then accidentally started working on that xcode project. So I have
-- Original xCode project where I usually push/pull from github
-- downloaded xcode project that is one step ahead of my project on github.
Basically I want the downloaded/modified project to be my next commit in my original git repository.... but its a completely separate project now. Is there a way I can merge two separate git repositories / projects?
Simply copy the files over, then
git add -A
git commit
git push

Resources