Git ~'git status' 上的 HEAD 标签

Git ~HEAD tag on 'git status'

正在测试一些处于分离 HEAD 状态的旧提交。当我签出我的最新提交时,我看到文件旁边有以下 ~HEAD 标记(git 状态)。

Davids-MacBook-Air:android david$ git status
On branch random_video
Untracked files:
(use "git add <file>..." to include in what will be committed)

app/src/main/java/com/myApp/android/Models/VideoMetadata.java~HEAD
app/src/main/res/drawable/lobbytab_random.xml

nothing added to commit but untracked files present (use "git add" to track)

HEAD 怎么可能在特定文件上——它不是指向特定时间点代码状态的指针吗?

How is it possible for the HEAD to be on a specific file - isn't it a pointer to the state of code at a specific point in time?

没错。你对什么是头有全貌。
Head 是指向您的存储库中当前提交的指针。

在这里您可以阅读更多相关信息以及如何 "move" HEAD。

在你的例子中,~HEAD 是你在途中某处进行的合并的剩余部分。