简体   繁体   中英

How can I get Git to display differences in an editor for uncommitted changes?

I cloned a Git repository and would like to see the changes from the files in my directory compared against HEAD in my editor (vi). I normally use difftool for this job but it only seems to accept commits, not working files. Is there a way to do this?

Got it - if there are no changes in the file then difftool just exits. Otherwise, it pops up the diff tool.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM