I've just started to use Git, and so far I've found it useful. Naturally, there are a couple of things that have me stumped though:
1) Let's say we have two branches like so:
Code:
A -- B -- D
\ \
C -- E
In other words, the bottom branch is based on the top branch, but the bottom branch has a couple of additions. Then, we make a commit to the lower branch:
Code:
A -- B -- D
\ \
C -- E -- F
Now, if the patch from E to F was one that we would actually rather like applied to D, how do we do so properly in git? We can't just pull from the bottom branch since that would pull the extra stuff that makes the lower branch distinct from the top branch.
So far, I've just been using git-diff to generate patches and apply them myself, but surely there's a way to do this properly?
2) In a similar situation, we have two branches again:
Code:
A -- B -- D -- F
\ \
C -- E
We then make a change to the top branch, which we don't want to pull into the lower branch. However, we still want all following patches to be pulled into the lower branch e.g.
Code:
A -- B -- D -- F -- G
\ \
C -- E
We now want to apply the patch from F to G, but without the patch from D to F. Of course, we can no longer use git pull since this would apply the unwanted patch.
Any help on either of these cases is greatly appreciated.
Mike.