fatal: No configured push destination

异常描述

$ git push
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
 git remote add <name> <url>
and then push using the remote name
 git push <name>

原因分析

本地通过Git下载代码后进行了修改,在推送至远程仓库时缺少目标仓库地址

解决方案

1. 本地客户端远程连接目标仓库

 git remote add origin https://github.com/**/*.get

2. 推送本地代码至远程仓库分支

git push -u origin master

注意:

以上操作是在本地已经执行addcommit命令并将代码纳入本地仓库管理的前提下操作。如果本地代码未提交至本地仓库管理则需要先执行以下操作

-- 添加文件至缓存区
git add ./project

-- 提交代码至本地仓库
git commit  -m '本次提交代码注释'	
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值