How can I quickly reference a file from git status without the full path
I typically have a few files I'm working on in a given commit and
sometimes I want to commit only some of them or perhaps roll a few back. I
end up having to type out most of the file by hand especially, if the
files are in the same path.
git status
...
modified: src/foo/Views/bar/helloWorld.html
modified: src/foo/Views/bar/helloCrazyWorld.html
modified: src/foo/Views/bar/goodByeCruelWorld.html
modified: src/foo/Controllers/bar/hello
modified: src/foo/Controllers/bar/goodbye
Ignoring the terrible and nonsensical directory structure. What is the
best way to quick specify that I want to git checkout
src/foo/Controllers/bar/hello without actually typing out the full path?
Assume there might be similar directories like the following so that
tab-completion isn't always more viable than just typing.
src/fob
src/foo/Views/bad
It would be nice to be able to say git checkout #4 and have it checkout
the 4th item. Or git commit #2 to commit the second.
No comments:
Post a Comment