Ok, so the problem is that you both started developing the same project on your own, and now you’re trying to merge them, and Git doesn’t know which changes to trust. You can override this, but it will likely cause you more issues.
Instead, here’s what I recommend:
- Close your project.
- Rename your entire project folder to something else - I recommend putting “old” in the name.
- In your projects folder, run a
git clone
followed by the URL of the repo.
- Open up both projects. Copy all your changes into your partners’ project.
- Add and commit all your changes.
- Do a push.
- Profit!!!
This may take a while, but doing anything else is going to take you down a dark git path. If you want to do that, it’s time to start posting questions on StackOverflow and ask how to do a merge with unrelated histories.
Good luck!
both of us? Or just me or partner?
Only one of you should do it. The issue is that you have two separate project histories from two different people, so to fix it, one person should modify their project to make it the definitive project that the other one uses.
Open up two instances of godot so you have both projects open at once.
but how do I copy? just manually?
1 Like
Yes. Sadly there’s no other way.
fatal: not a git repository (or any of the parent directories): .git
Sounds like you copied the files from your friends git into your non-git copy, but you may be able to merge unrelated histories. Try googling the output of the git program, it’s very old and has decades of support online.
decided to just use vscode live collab
1 Like
I think it’s definitely worth giving Git another try, especially if you approach it with the right mindset from the start. There is a bit of a learning curve, and it takes some practice to get comfortable, but the power and flexibility Git offers are truly impressive. It still amazes me, and still feels like magic sometimes. Git was designed with a wealth of real-world experience, and it really shows in its capabilities. It has never let me down.
If you have a new project coming up, maybe consider revisiting Git then. The effort you put into learning it really pays off, especially when you need to track down and fix issues by rolling back changes. Personally, I use GitHub Desktop, which makes things much more approachable compared to using Git solely from the command line.
Just wanted to share my perspective…
PS VSCode Live Collab is very different to GitHub distributed version control. There is no reason why you would not use both. They do very different things.
3 Likes
A great game-like open-source learning website for git, it was where my mind of GUI had been learned. (No, don’t look at me like that, I do use terminals.)