From: Merlin Büge Date: Mon, 25 May 2020 20:11:00 GMT Subject: Question about behaviour of git-checkout --patch option Message-ID: <20200525221100.31d36d4d.toni@bluenox07.de> Hi all! I have a question about the behaviour of the git-checkout --patch/-p option. I have a small local git repository containing empty and non-empty files. I wanted to replicate it in another directory and did the following: cd git init git remote add origin git fetch git branch --track master origin/master git checkout master . This works like expected, I end up with a 1:1 copy of the original worktree, including empty files. However, if I include the -p option in the last step: git checkout -p master . ... I correctly get asked for any non-empty files/hunks if I want to apply them - but not for empty ones. It would just display e.g. diff --git b/emptyfile a/emptyfile new file mode 100644 index 0000000..e69de29 and then skip over it, asking for the next non-empty hunk. Why does it skip over empty hunks? Thanks! -- Merlin Büge