How to open all deleted, modified and created files since the last git commit, I first tried to use git status , but it was hard to parse, so I found that git status --porcelain was easier to parse and with awk + vim + some bash magic easy to do.
git status
git status --porcelain
So, I found a solution with vim :
vim
vim $(git status --porcelain | awk '{print $2}')
And I am posting this question + answer, just to answer it myself and share it with the Internet
git ls-files --modified --deleted --others -z | xargs -0 vim
To make this work when im is in the git repo subfolder, I just use the -s option for git status. The Vim -O option opens files in vertical section.
vim -O $(git status -s | awk '{print $2}')
From this blog you can edit ~/.gitconfig and add this line:
~/.gitconfig
[alias] edit = !$EDITOR $(git status --short | awk '$1 ~ /^M|A|U/ {print $2}' )
Now git edit will open all modified files
git edit