本文介绍了如何修复缺少的git远程详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些存储库克隆允许我这样做:
%git pull %git push但其他储存库要求我输入:
%git pull origin master %git push origin master< p我认为我在后一种情况下失去了一些东西 - 有人知道这里发生了什么(不)吗?我使用的是最新的git版本,显然没有很好地使用它。 解决方案
在编辑器中添加 .git / config 文件。
将此附加到文件末尾:
[branchmaster] remote = origin merge = refs / heads / master这几乎只是一个别名,所以git默认从原始主机中获取。
Some repository clones I have allow me to do this:
% git pull % git pushBut other repositories require me to type:
% git pull origin master % git push origin masterI think I am missing something in the latter case - does anyone know what is (not) going on here? I am using the latest git version, just obviously not using it well.
解决方案If you cd into your repository directory and then open up your .git/config file in an editor.
Append this to the end of the file:
[branch "master"] remote = origin merge = refs/heads/masterThis is pretty much just an alias so git knows by default to pull from origin master.
更多推荐
如何修复缺少的git远程详细信息?
发布评论