I'm currently refactoring my Xcode project into a Swift Package with multiple modules, which I combine with a lightweight Xcode project using an XCWorkspace (kind of like Pointfree's isowords). Right now, my Xcode project is hosted on a GitHub repo. However, with this refactoring, it's the Swift Package which will be hosted on GitHub.
Can I replace my Xcode project with the Swift Package on the repo, without losing all my history? Will the history of files inside my Xcode project still show up?
Yes, this will be fine. Even if you delete every single file in your git repository and push it, your entire commit history will still be there. Feel free to replace your project with a package!