开发者

git remote /home/username/www/lorem.git

开发者 https://www.devze.com 2023-02-15 10:43 出处:网络
How can I use /home/username/www/example.git with remote add command? if I use this: git remote add origin user@example.com:/home/user/www/example.git

How can I use /home/username/www/example.git with remote add command?

if I use this:

git remote add origin user@example.com:/home/user/www/example.git   
git push开发者_开发百科 origin master

I got this error:

error: src refspec master does not match any.   
error: failed to push some refs to 'user@example.com:/home/user/www/example.git'


Default behaviour of git push is just to push "matching refs", i.e. branches which are present both in the local and the remote repository. In your example, there are no such branches, so you need to tell git push which branches to push explicitly, i.e. via

git push origin branch-to-be-pushed

or, if you want to push all branches,

git push --all origin
0

精彩评论

暂无评论...
验证码 换一张
取 消