问题1 :因为客户端使用 sourcetree ,但是在服务器上新建一个仓库后,本地不能够推送上去。
然后出现问题:
- remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
- remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
- remote: error: its current branch; however, this is not recommended unless you
- remote: error: arranged to update its work tree to match what you pushed in some
- remote: error: other way.
解决方法,在服务器端使用命令:git config receive.denyCurrentBranch ignore
.
然后push上去以后 在服务器端却找不到 push上去的代码。则在服务器端使用:
远程端必须运行命令:git
reset --hard才能看到push后的内容。
本文介绍了解决 Sourcetree 客户端无法将本地代码推送到新创建的远程仓库的问题。通过调整服务器端 Git 配置允许推送当前分支,并使用硬重置查看推送内容。
478

被折叠的 条评论
为什么被折叠?



