#Error
fatal: /usr/local/libexec/git-core/git-pull cannot be used without a working tree.
注意,不是git版本问题,有些文章的解释是错误的。
#原因
在bare仓库执行git pull操作
bare库,本身只作为仓库使用,而不作为工作区使用,即is not a working tree。
#解决方法:
- 不用解决。
参考:
http://stackoverflow.com/questions/8565828/troubleshooting-git-pull
A bare repository doesn't have a working tree. git pull
is functionally the same as a git fetch
followed by a git merge
, and to do a merge you have to have a working tree (in case there are conflicts you need to sort out).
You have to push to a bare repo. Pull will not work as it requires a working directory to merge to, which is what the error message that you see says.
So setup a remote to the bare repo from the repo that you will be working on and push from that.
PS: The ideal way to create a bare repo is to do git init --bare <reponame>
#错误分析
还是要加深对事物本质的理解。
0
1
2
3
=
*
%
#
!
相关推荐
linux_git_show_numstat_since_Linux-2.6.12-rc2:linux_git_show_numstat_since_Linux-2.6.12-rc2
python库。 资源全名:pybuilder_semver_git_tag-1.0.7-py3-none-any.whl
python库,解压后可用。 资源全名:git_annex_remote_googledrive-0.11.1-py3-none-any.whl
python库,解压后可用。 资源全名:pybuilder_semver_git_tag-1.0.7-py2-none-any.whl
资源来自pypi官网。 资源全名:pybuilder_semver_git_tag-1.0.7-py2-none-any.whl
解决fatal:remote error:You can’t push to git://github.com/username/*.git问题的办法 今天Git push的时候 fatal:remote error: You can't push to git://github.com/username/*.git Use git@github....
python库。 资源全名:git_hooks_1c-9.2.2-py3-none-any.whl
资源来自pypi官网。 资源全名:git_utils_dmaahs2017-0.0.5-py3-none-any.whl
非常好用的一款分布式版本控制器,可以让你的项目管理的有条有序。
Linux离线安装git的安装及说明文档+所需依赖 ...git-1.8.3.1-23.el7_8.x86_64.rpm gettext-common-devel-0.19.8.1-3.el7.noarch.rpm expat-2.1.0-11.el7.x86_64.rpm perl-ExtUtils-MakeMaker-6.68-3.el7.noarch.rpm
资源分类:Python库 所属语言:Python 资源全名:git_delete_merged_branches-1.0.0-py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
20170506最新版git_Git-2.12.2.2-64-bit_TortoiseGit-2.4.0.2-64bit
资源来自pypi官网。 资源全名:django_git_changelog-0.5.4-py3-none-any.whl
资源来自pypi官网,解压后可用。 资源全名:django_git_changelog-0.1.0-py3-none-any.whl
离线安装包,亲测可用