码迷,mamicode.com
首页 > 其他好文 > 详细

git初次推送

时间:2018-05-03 11:39:07      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:使用   conf   one   rem   ssh   git clone   add   oba   代码   

第一次配置Git

git config --global user.name "xxxx"
git config --global user.email "xxxx@xxxxxx.com"

使用您的存储库

我只想克隆这个存储库

如果要简单地克隆此空存储库,请在终端中运行此命令。

git clone ssh://git@xxxxxxx

我的代码已经准备好推送

如果你代码已经准备好推送到仓库,请在终端中执行该命令

cd existing-project
git init
git add --all
git commit -m "Initial Commit"
git remote add origin ssh://git@xxxxxxx
git push -u origin master

我的代码已经由Git跟踪

如果你的代码已经由Git跟踪,然后设置这个仓库作为你的“origin”推送。

cd existing-project
git remote set-url origin ssh://git@xxxxxxxx
git push -u origin master

git初次推送

标签:使用   conf   one   rem   ssh   git clone   add   oba   代码   

原文地址:https://www.cnblogs.com/cangqinglang/p/8984457.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!