git推送出错

项目更换了文件夹之后推送项目到远程仓库,在使用git push命令时,报了错误

fatal: No destination configured to push to

=  根据意思理解为缺少推送地址,因此没有成功。

查阅了相关资料,有多种解决办法,自己进行了尝试都没有成功,这里归纳一下网上的办法。

1、推送表明需要推送的地址

git push [email protected]:billfeller/historyBrowsing.git

2、推送前,先通过git remote链接远程仓库,在git push

git remote add origin [email protected]:billfeller/historyBrowsing.git

尝试以上两种办法均未能解决办法,自己尝试了一种比较简单的,建立一个文件夹,克隆远程仓库项目到本地,复制克隆文件中的 .git文件到自己要推送的项目中,再次推送项目便可以了

猜你喜欢

转载自www.cnblogs.com/yaradish/p/9489530.html
今日推荐