Reputation: 3111
I'm facing the following problem: I have an app I've developed, and a contributor who forked my app some time ago has done some changes to the code and I would wish to integrate his changes to my app on my git repository. However, as it is expected, I also did some changes to my code and he worked with an older version of my app.
The only thing I have from him is a zip file with an almost duplicate of my app and completely untracked on any git repository, and I don't think it is a good idea reviewing changes file by file if I can avoid it. I don't mind to manually merge/resolve conflicts (I'm sure I'll have to).
How can I do this?
Thank you.
Upvotes: 0
Views: 339
Reputation: 42899
First of all I'd recommend to clean your git
working copy, stash
or commit
changes, till you reach a clean no changes state ( even if they are not pushed )
You can extract and paste the new files into your git folder, but you need to make sure that each file overwrites the it's exact corresponding file in the git directory.
git
will understand the changes and mark them when you do a diff
, I think your worst case would be if he has a meaningless change that exists in every line, like for example different spaces or tabs than your original copy.
Then you could fire up some good difftool
you can rely on to point out these changes, so you can undo or take which ever you want.
If every thing is successfully handled, you can git add
and git commit
, and if it's all messy and unbearable you could just use git reset --hard HEAD
to remove tracked changes and git clean -df [files|folders]
to remove untracked changes
Upvotes: 1