I created a feature branch from the master branch, and added and committed some change to my branch.
Now I want to push my work to the remote repository, but it failed. What can I do to solve the problem? Thanks.
When running git push
command, it didn't ask for my password. Is it normal?
p.s. I am using Windows 10's 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 <tim@xxx.com>
Date: Fri Feb 3 23:50:43 2017 -0500
my work
commit 687f22d54b89e0de91f16cf79d52c6ea21a3f562
Author: Kevin <kevin@xxx.com>
Date: Thu Jan 19 12:26:26 2017 -0500
Added gitignore