这里是两次检出的结果:为什么第二次失败了?'git status' 显示有些文件已被修改,但我确定我没有碰过那些文件。
praveensripati@MyMini:~/Hadoop/Git/hadoop-common$ git checkout branch-0.21
Switched to branch 'branch-0.21'
praveensripati@MyMini:~/Hadoop/Git/hadoop-common$ git checkout branch-0.20
error: The following untracked working tree files would be overwritten by checkout:
CHANGES.txt
LICENSE.txt
README.txt
bin/hadoop
bin/hadoop-daemon.sh
bin/hadoop-daemons.sh
Please move or remove them before you can switch branches.
Aborting
praveensripati@MyMini:~/Hadoop/Git/hadoop-common$ git status
# On branch trunk
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# CHANGES.txt
# LICENSE.txt
# README.txt
# bin/
# build.xml
# conf/
# lib/
# site/
# src/
nothing added to commit but untracked files present (use "git add" to track)
git status
会显示什么?它是否报告了任何更改或未跟踪的文件? - Jan Hudec