在一个git场景中,我在本地系统上有同样的非提交文件,这在git上也是可用的。现在的情况是,我没有添加这些本地系统文件,当我试图提取主文件时,它提示错误删除这些本地文件。
有什么建议怎么解决这个问题吗。
发布于 2016-04-01 21:40:13
让我们假设您在您的develop
分支上,并且您想要的本地文件是experimental.local.file.txt
。在这种情况下,您可以使用此方案:
git checkout -b experimental
git add experimental.local.file.txt
中git commit -m 'Add experimental file'
origin/develop
)并将其与这个实验性分支git pull ./ origin/develop
合并develop
签出返回到git checkout develop
develop
分支与origin/develop
与命令git pull
合并即可。在您的本地分支中没有更多的experimental.local.file.txt
,因此您可以在没有错误的情况下进行提取。experimental.local.file.txt
分支签出您的experimental
文件,命令如下:git checkout experimental path/to/experimental.local.file.txt
https://stackoverflow.com/questions/36354436
复制相似问题