我從主分支創建了一個功能分支,並向我的分支添加並提交了一些更改。錯誤: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