如何将 git 结帐更改为原始结帐
How to change git checkout to original
我用 git 克隆了一个软件。
git clone https://github.com/BinPro/CONCOCT.git
然后
cd CONCOCT
git fetch
git checkout SpeedUp_Mp
然后我收到了这条消息。
Branch 'SpeedUp_Mp' set up to track remote branch 'SpeedUp_Mp' from 'origin'.
Switched to a new branch 'SpeedUp_Mp
然后我把
sudo python ./setup.py install
现在我想像以前一样把它变成'origin'。
所以我把
git fetch
git checkout origin
然后我收到一条错误消息
error: Your local changes to the following files would be overwritten by checkout:
concoct/cluster.py
Please commit your changes or stash them before you switch branches.
Aborting
我能做什么?我如何提交更改?
如果你想获得原始版本的分支,
结帐到新分支,删除本地有问题的分支
git branch -d SpeedUp_Mp
git fetch --all
git checkout SpeedUp_Mp
否则,您可以检查所做的所有更改
git checkout .
我用 git 克隆了一个软件。
git clone https://github.com/BinPro/CONCOCT.git
然后
cd CONCOCT
git fetch
git checkout SpeedUp_Mp
然后我收到了这条消息。
Branch 'SpeedUp_Mp' set up to track remote branch 'SpeedUp_Mp' from 'origin'.
Switched to a new branch 'SpeedUp_Mp
然后我把
sudo python ./setup.py install
现在我想像以前一样把它变成'origin'。 所以我把
git fetch
git checkout origin
然后我收到一条错误消息
error: Your local changes to the following files would be overwritten by checkout:
concoct/cluster.py
Please commit your changes or stash them before you switch branches.
Aborting
我能做什么?我如何提交更改?
如果你想获得原始版本的分支, 结帐到新分支,删除本地有问题的分支
git branch -d SpeedUp_Mp
git fetch --all
git checkout SpeedUp_Mp
否则,您可以检查所做的所有更改
git checkout .