好的,我有以下分支:
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客户端Tower),当它不能满足我的需求时,我就转向了命令行。
git diff master 2012-08-06-AAH -- MyProject/canada/rocky_mountaineer/best/coast_to_coast_rail/index.html
这个命令会显示什么? - Christopher