开发者

Creating a git Patch in eclipse across commits

开发者 https://www.devze.com 2023-02-11 17:55 出处:网络
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

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

精彩评论

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