Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9235951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:10:26+00:00 2026-06-18T07:10:26+00:00

I have an iOS project setup to on github and over the past few

  • 0

I have an iOS project setup to on github and over the past few days I have started to realize that I need to refactor most of my code. I build the project not abiding by many of the basics of MVC and now want to go back and fix everything.

The main issue is that the project is large enough where refactoring will be a massive pain. Is there anyway that I can start a new project, build it to the place the current one is at (obviously with some major design changes) and push that up to github into the same branch instead of the original project? If this is not clear please let me know.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:10:27+00:00Added an answer on June 18, 2026 at 7:10 am

    I would expand on the given answers a bit, given your desire to keep your old history. In this case, you don’t want to start a new repo; you just want to “manhandle” the old one, clearing out old data and adding new. You can accomplish this with the following steps:

    1. cd into the root of your project dir.
    2. Remove everything you don’t want from the filesystem. Be careful to leave the .git/ folder. That’s your repository’s previous history.
    3. Add whatever new stuff you want (new Xcode project, directory structure, etc.).
    4. When you’re ready to commit, git status is going to show you quite a mess (the size of which will depend upon how many files you used to have) of deletions and additions. That’s okay, this is where you take a broad brush to all of these entries, with git add --all .. This will stage everything in your repo, deletions, new additions, all of it.
    5. git commit -m "My new beginning".
    6. git push origin myBranch --force

    Voila! Your repository is completely made over, with the added bonus of retaining your previous history.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iOS project in Xcode that works great. I added the classes
I have inherrtied an IOS project that was being built primarly for iphone. When
I'm working on an iOS project that has to work from iOS4. I have
I am a noob of iOS development. Now I have a project that parses
I'm using Core data in an iOS project. I have the data model setup
I have an ios xcode project, that compile and running fine for simulator but
I have a dual-head setup for Xcode that I use for developing on iOS,
I have an iOS project I have been working on for the last few
I've started a new iOS project and I was surprised to see that the
I have an iOS project to open and when i open it i get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.