我们有一个post-receive钩子,它将源代码放入特定的工作树中。部分内容如下:
git --work-tree=$ur checkout -f $b
echo "-- your changes were checked out to UAT: branch $b: root: $ur"
我们如何看到有人更改了此目录中的文件?
我试过了:
git --git-dir=$repo --work-tree=$work_tree status
更改了文件,但未标记更改的文件。
# On branch 1.1.x
nothing to commit (working directory clean)
这会检测新文件,但不会更改文件。例如一个新文件给出:
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# web/sites/what.txt
nothing added to commit but untracked files present (use "git add" to track)
git版本是1.7.1
答案 0 :(得分:0)
我正在测试更改的文件位于.gitignore