Creating git patch in eclipse through commits

I use git through the Eclipse egit plugin . I am new to using git as my VCS and wondered if there is a way to create a patch that captures the changes in multiple commits from Eclipse. For instance:

  • Work on a new feature
  • Obligatory work
  • Correct mistake
  • Obligatory work
  • Create a patch with the added C # 1 code

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

+1
source share
1 answer

The git command you are 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 would look for some arbitrary diff function: "diff to ... [commit]".

+1
source

Source: https://habr.com/ru/post/1479395/


All Articles