I have a Swift project in Xcode where local source control was originally set up.
So this results, when I go to the Source Control Navigator
, I see commits for the last few years.
I now wish to save just the latest version of this source to GitHub. I set up a Remote
but it pushed all of the historical commits to GitHub, which I did not want, so I deleted that repo. Also, I would prefer that the newly added (project)/Git/.gitignore
file is honored.
It would be preferable to have the option of looking back at the changes from the last few years locally, and only share the current version remotely. But if I didn't need that, then one idea that came to me would be to completely remove source control from this project (one method), then re-establish source control for the project and connect it to the remote. I had hoped that there was a "right way" to preserve history locally while sharing only the current version remotely.
What steps should I take to make it so the version on GitHub has no history and honors the new ignore file?