git推起源头? [英] git push origin head?

查看:107
本文介绍了git推起源头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在git repo下对文件进行了一些修改,我使用 git commit

I had made some changes to a file under a git repo, I committed the files using git commit

然后我尝试使用返回所有最新

我输入了 git push origin head ,虽然我不确定是否应该这样做,但似乎可行。以前 git push origin head 一直为我工作。

I typed git push origin head which seemed to work although I'm not sure if I'm supposed to do this. Previously git push origin head had always worked for me.

我的问题是,为什么 git push origin master 不做任何事情,我应该回滚并重新提交,然后 git push origin master

My question is, why would git push origin master not do anything and should I roll back and re-commit, then git push origin master?

推荐答案

如果您正在开发分支,那么 git push origin master 不是因为你要求它推送 master 分支。如果你想推动你的开发分支,你需要运行:

If you're working on a development branch, then git push origin master isn't going to do anything because you've asked it to push the master branch. If you want to push your development branch, you need to run:

git push origin development

...或者你称之为开发分支的任何东西。做完一次之后,通常应该可以运行 git push 而无需附加参数。

...or whatever you've called your development branch. And after doing that once, you should generally be able to run git push without additional arguments.

这篇关于git推起源头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆