0

I have a kind of a situation - There's a project that we've forked but the person who originally forked it did not really know how git works so he just created a new repository and copied the code. Unfortunately that was not caught in time and there are already many changes in both our fork and the original project (whose repository is read-only from our perspective). We'd like to reach a situation where we could cherry-pick some of those later changes from the original project into our fork (including changes made to the original project so far). I'm not too familiar with advanced git commands so I please forgive me if it's a stupid question.

Properly creating a new forked repo is perfectly fine and is our intention in the first place, it's only the original project's repo that we can't touch. I'm not exactly sure which was the last commit to the original project before the new repo was created but I have a few candidates.

Thank you!

1

1 Answer 1

0

disclaimer : this is dangerous. Backup everything BEFORE.

I have been in the same situation and you can use git rebase to save the day. Look at this answer. It helped me a lot.

Sign up to request clarification or add additional context in comments.

2 Comments

I'll try, though as I said I'll first try to find the common ancestor, since it's one of about 5 candidates. If I find it and git checkout by its sha1 does it make things easier?
I can make some tests to give you a more precise procedure. Do you kow at least which commit was the latest one when the copy was made ?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.