首页 > Web开发 > 详细

git上传本地项目

时间:2021-07-21 12:03:34      阅读:14      评论:0      收藏:0      [点我收藏+]

使用此选项创建的项目,多数情况是用户已经在本地有了一个项目,想把此项目变成使用Git管理。

$ 进入此项目所在文件夹
$ git init
$ git add .
$ git commit -m “first commit”
$ git remote add origin <项目url, 如git@code.csdn.net:xxx/xxx.git>
$ git push -u origin master

?

例如

?

git config --global user.name "Your Name Here"

# 设置Git提交时的默认用户名,推荐使用本站用户名:乔志勇


git config --global user.email "your_email@example.com"

# 设置Git提交时的默认邮箱,推荐使用本站注册邮箱


?

touch README.md

git init

git add README.md

git commit -m "first commit"

git remote add origin git@code.csdn.net:qq_16605855/spring_mvc.git

git push -u origin master

git上传本地项目

原文:https://blog.51cto.com/u_13609606/3147663

(0)
(0)
   
举报
评论 一句话评论(0
分享档案
最新文章
教程昨日排行
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!