好的,我有以下分支:
git branch
2012-08-06-AAH
2012-08-06-JWH
2012-08-06-Master
* master我想去2012-08-06-AAH结账。所以我这样做:
git checkout 2012-08-06-JWH
error: Your local changes to the following files would be overwritten by checkout:
MyProject/canada/rocky_mountaineer/best/coast_to_coast_rail/index.html
MyProject/europe/train_tours/scenic_europe/index.html
MyProject/europe/train_tours/springtime_alps/index.html
MyProject/europe/train_tours/week_in_spain/index.html
MyProject/europe/train_tours/windmills_vineyards_paris/index.html
MyProject/europe/train_tours/wonderful_france/index.html
MyProject/europe/train_tours/wonders_st_petersburg_moscow/index.html
Please, commit your changes or stash them before you can switch branches.
Aborting好的..。当然可以。所以我这样做:
git status
# On branch master
nothing to commit (working directory clean)嗯..。那么,如果没有要提交的内容,我该如何“提交您的更改或隐藏它们”?
感谢您的帮助--我是一个Git新手(主要使用的是塔式GUI客户端),当它失败时,我求助于命令行。
发布于 2012-08-19 15:54:16
如果您确定没有对这些文件进行任何本地修改,则可以尝试使用
git checkout -- .这会将工作树重置为HEAD,并应允许签出继续进行。
https://stackoverflow.com/questions/12018098
复制相似问题