Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use "git add --patch" in PhpStorm

I am in the process of migrating our old environment from SVN + eclipse to Git + PhpStorm. I read many tutorials about Git and just recently found the git add --patch command. Is it possible to use it in PhpStorm through the GUI?

I already tried to do it manually using a terminal window inside of PhpStorm, but when I than use the VCS | Commit Changes window, it will just add the rest of the lines to the staging area and commit all hunks.

like image 313
2ndkauboy Avatar asked Jun 27 '14 11:06

2ndkauboy


People also ask

How do I apply a patch in Phpstorm?

Apply patchesSelect VCS | Patch | Apply patch from the main menu. In the Apply Patch dialog that opens, specify the path to the . patch file you want to apply.

What is Git patch command?

GIT patch or GIT diff is used to share the changes made by you to others without pushing it to main branch of the repository. This way other people can check your changes from the GIT patch file you made and suggest the necessary corrections.

What is Git format patch?

Patch is a text file, whose contents are similar to Git diff, but along with code, it also has metadata about commits; e.g., commit ID, date, commit message, etc. We can create a patch from commits and other people can apply them to their repository.


2 Answers

AFAIK it is not available: http://youtrack.jetbrains.com/issue/IDEA-63201

Please follow that ticket (star/vote/comment) to get notified on progress.

like image 182
LazyOne Avatar answered Sep 25 '22 17:09

LazyOne


There is actually some progress, the feature you mentioned is now in the EAP release.

https://blog.jetbrains.com/idea/2018/02/intellij-idea-2018-1-eap-partial-git-commits-and-more

like image 44
Vojtech Kane Avatar answered Sep 21 '22 17:09

Vojtech Kane