我从主分支创建了一个功能分支,并向我的分支添加并提交了一些更改。错误:src refspec我的分支不匹配任何
现在我想推动我的工作到远程存储库,但它失败了。我能做些什么来解决这个问题?谢谢。
运行git push
命令时,它没有要求输入我的密码。这是正常的吗?
p.s.我正在使用Windows 10的cmd。
> git push origin my-branch
error: src refspec my-branch does not match any.
error: failed to push some refs to 'https://git.xxx.net/Infrastructure'
>git commit -m "my work"
On branch my-branch
nothing to commit, working tree clean
>git branch
master
* my-branch
>git show-ref
687f22d54b89e0de91f16cf79d52c6ea21a3f562 refs/heads/master
f85d2aa0900fb356d8d120f454ff2362d7475edb refs/heads/my-branch
687f22d54b89e0de91f16cf79d52c6ea21a3f562 refs/remotes/origin/HEAD
687f22d54b89e0de91f16cf79d52c6ea21a3f562 refs/remotes/origin/master
>git log
commit f85d2aa0900fb356d8d120f454ff2362d7475edb
Author: tim <[email protected]>
Date: Fri Feb 3 23:50:43 2017 -0500
my work
commit 687f22d54b89e0de91f16cf79d52c6ea21a3f562
Author: Kevin <[email protected]>
Date: Thu Jan 19 12:26:26 2017 -0500
Added gitignore
你有没有在'my-branch'中提交? 'git log'输出? –
对于'git log'输出,请参阅添加的。我怎么知道我是否在我的分支中有任何提交? – Tim