this should be a relatively trivial problem, I just (very) new to using Git, so please forgive the simple question. I need to get some updates along our Development branch into a Feature branch because they are critical, however there's a minor complication in that some of the updates on Feature were pushed previously, but not all of them.
I've been reading git manuals, I've had a look around and I'm not 110% I have this entirely down yet. I'm not certain how this works...
What I've Done:
- I created a local Feature branch, forking it off our Development
branch at {B}
- I worked on it for a bit. I committed some changes three times
{I,J,K}.
- I pushed these three commits, as a new remote branch.
- I had to merge Feature into Development {E}.
- I worked on Feature a bit further, committing twice again {L,M}.
- Something came up, and I then had to push three commits to
Development {F,G,H}, critical to Feature.
What We Have:
A ---- B ---- C ---- D ---- E ---- F ---- G ---- H [DEVELOPMENT]
\ /
\ /
I ---- J ---- K ---- L ---- M [FEATURE]
Therefore, our current state:
- Local/Feature is at {M}
- Remote/Feature is at {K}
- Local/Development is at {H}
- Remote/Development is at {H}
My IDE reports my Feature branch is 2 Ahead {L,M}, and 4 Behind {E,F,G,H}.
What We Want:
We need the most recent updates committed to Development to be drawn into Feature, so I can keep going. It should look something like:
A ---- B ---- C ---- D ---- E ---- F ---- G ---- H [DEVELOPMENT]
\ / \
\ / \
I ---- J ---- K ----- ------ ------ ----- L ---- M [FEATURE]
Further Details
- I'm the only one working on the Feature branch anywhere.
- No one has pulled my previously pushed commits to Feature.
How do I fix this solution, without making the remote branch system in particular ugly or fragmented?
This should be a very simple rebase or merge operation from the Feature branch, one command, right?
git rebase Development (then correct any conflicts)?
I don't know what this will do to the remote, and I really don't want to break anything for anyone. If anyone could enlighten me on how to do this properly, I'd appreciate it. :)