开发者

How do I show changes that have been made to the develop branch since the last rebase of my feature branch?

Using the git flow model, I've got a feature branch that was split from the develop branch at some point in the past. While I'm working on my feature branch, other developers commit to the develop branch. As a result, I'll occasionally perform a rebase to pull these changes into my feature branch.

My question is, how can I get a diff of changes that have been made to the develop branch since the 开发者_运维百科last time I rebased? I.e., "Is my feature branch up to date with the develop branch, and if not, what am I missing?" or perhaps, "If I do a rebase now, what will I get?"

Here's what I've got so far:

Find the commit where we branched:

git merge-base feature/my_feature develop

Find the diff between that commit and develop's HEAD:

git diff <id from above> develop

I can easily merge these into a single command:

git diff $(git merge-base feature/mybuys develop) develop

But that seems rather roundabout. Is there a better way to do this in one shot?


This is what the triple dots are for:

git diff feature/mybuys...develop
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜