从源git问题ckan次要升级

时间:2016-03-31 12:31:08

标签: git ubuntu-14.04 upgrade ckan

我尝试在CKAN安装上从源代码进行小幅升级。我们目前在Ubuntu 14.04上的虚拟环境中运行CKAN 2.2。 由于错误,我想将CKAN升级到版本2.5.2

我按照建议的步骤操作:http://docs.ckan.org/en/latest/maintaining/upgrading/upgrade-source.html

git fetch工作正常并给了我:

From https://github.com/ckan/ckan
 * [new branch]      2.3.5-fix-solr-circleci -> origin/2.3.5-fix-solr-circleci
   9b3c01b..d0c8505  2933-test-faster -> origin/2933-test-faster
   b937f6a..e55dfca  master     -> origin/master
   6bba236..29c9aa2  release-v2.3.4 -> origin/release-v2.3.4
 * [new branch]      release-v2.3.5 -> origin/release-v2.3.5
   428c44e..7d2702f  release-v2.4.3 -> origin/release-v2.4.3
 * [new branch]      release-v2.4.4 -> origin/release-v2.4.4
   39a8901..1596665  release-v2.5.2 -> origin/release-v2.5.2

但是,运行checkout语句(git checkout release-v2.5.2)会导致以下错误:

error: Your local changes to the following files would be overwritten by checkout:
        ckan/config/solr/schema.xml
        ckan/i18n/en_GB/LC_MESSAGES/ckan.mo
        ckan/i18n/en_GB/LC_MESSAGES/ckan.po
Please, commit your changes or stash them before you can switch branches.
Aborting

我试图在线找到解决方案,但无法弄清楚下一步该做什么。我也尝试了以下命令(没有成功):

git checkout -- release-v2.5.2
sudo git checkout -- release-v2.5.2
sudo git checkout -- origin/release-v2.5.2

任何指向手册或其他指针的链接都非常赞赏!!

1 个答案:

答案 0 :(得分:0)

您需要运行命令git stash以保存您已更改的文件的状态,执行git checkout,然后执行git stash pop以恢复已更改的文件