您的位置:首页 > 其它

新建git仓库到服务器 和 客户端遇到的问题和解决方法

2014-06-29 01:11 344 查看
问题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后的内容。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐