开发者

Creating a git Patch in eclipse across commits

I'm using git via the Eclipse egit plugin. I am new at using git as my VCS and was wondering if there was a way to create a patch that captures the changes across multiple commits from within Eclipse. For example:

  1. Work on a new feature
  2. Commit work
  3. Fix a bug
  4. Commit work
  5. Create patch of code added since开发者_Python百科 #1

Can this be done from within eclipse using egit? If not, what is the command line for doing this?


The git command you're looking for is:

git diff HEAD~2 HEAD

HEAD means your current commit, and ~2 means "two commits before".

I'm not sure if egit can do this, but I'd look for some sort of arbitrary diff functionality: "diff against... [commit]".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜