danielhpavey.uk

Open all files from a specific Git Commit in Vim

I occasionally find myself needing to open all files from a specific Git commit. I use vim as my editor.

Soooo....

I created a little alias to get all the names of files modified in the specific commit and open them all in vim:

function vcommit(){
    vim $(git diff-tree --no-commit-id --name-only -r $1)
}

I hope you find this useful.

Date: Tuesday 31st October 2017