0

I currently have an Xcode project which has a remote in the organizer for a Bithucket repository. I want to start the project over with a fresh template. However I do not want to lose all my previous commits I just want a brand new project in Xcode but to Bitbucket it should just be like another commit. How do I go about in doing this? I would like instructions on what I do in Xcode and what I do in Bitbucket. Thanks in advance!

golddove
  • 1,165
  • 2
  • 14
  • 32

2 Answers2

0

I've never used the built in git client in XCode, but one idea would be to create the new project, migrate over the .git folder and .gitignore (if there is one) together with the source files and resources you may need.

I'm bit curious to why you'd want to create a new project.

I'd also recommend using the terminal version of git, but that's just an aside.

JBarberU
  • 999
  • 8
  • 16
  • It has gotten quite clunky and hard to update, so I want to start over. I do not need any of my old source files, if thats what you mean. Where do I find those folders and where do I migrate them? Will Xcode continue to commit the new projects to that same repo after I migrate that folder? – golddove Aug 08 '13 at 23:50
  • 1. Create new project 2. Move the hidden folder `.git` and the hidden file `.gitignore` from the old project to the new one. 3. Xcode should be good to go with the old git history in the new project. – JBarberU Aug 09 '13 at 11:44
0

It sounds like you might actually want a new project hosted on BitBucket. You have unlimited private repositories; use them.

If for some reason you want to use an anti-pattern, you could just create a separate branch for each of your products. It is much better to just create another repository for new projects though. Otherwise, it is not clear what you are tracking in the repo.

T.T
  • 1
  • OP specifically said he wants to keep his history. – Florian Margaine Jul 23 '13 at 17:11
  • Creating a new repository for a new project does not magically delete your old repository. I also mentioned a way to do specifically what OP asked for, create a new branch. – T.T Jul 23 '13 at 22:47
  • Yes, that is what I am resorting to, but I was wondering if there was a better way to do it. I am not starting a whole new product. It is simply a reboot of the same idea, so it would be better if under bitbucket it showed up as a new commit as opposed to a whole new repository. – golddove Aug 08 '13 at 23:38