I'm contributing to a project on GitHub.
I did the following:
- forked the repo
- clone the forked repo
- created a local branch in my local repo
- fixed a bug in the local branch
- pushed the changes to my forked repo
- made a pull request from that new branch
After many days, I got some comments and I have to make some more changes.
But their code has changed a lot since then. If I have to make a pull request again, I must update my new branch with their updated code and merge my changes.
How do I do this?
EDIT:
Before any of this my git log
looked like this:
commit A "feature done" (latest, what I wanted to push)
commit B "feature still acting weird"
I exactly did as VonC suggested (except that I was in my feature branch when I fetch
ed).
My rebase
had conflicts.
When I tried resolving them I was surprised to find that it was rebasing commit B
and not A
over the upstream master. I've checked this many times: git log
shows exactly what I showed.
Why is it rebasing a previous commit of mine over the upstream master?
EDIT:
I fixed the above issue by squashing my 2 commits A
and B
into one.
Don't know why it happened though...