问题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后的内容。