首页 > 其他 > 详细

Git安装配合码云的简单使用

时间:2020-02-12 15:00:39      阅读:68      评论:0      收藏:0      [点我收藏+]

Git安装配合码云的简单使用

 

一、 注册码云帐号 官网:https://gitee.com

二、 下载并安装Git 官网:https://git-scm.com

作用:

1.通过Git将代码存入码云中保存代码,版本记录详细,通过地址可分享给其他人。

2.也可以存入GitHub中(英文),建议使用国内码云(中文)。

 

\1. git下载windows32/64版本

官方地址:

https://git-scm.com/download

\2. 安装(全部默认下一步即可)

技术分享图片

技术分享图片

技术分享图片

技术分享图片

技术分享图片

技术分享图片

技术分享图片

技术分享图片

技术分享图片

 

技术分享图片

技术分享图片

 

 

 

任意文件夹下右键出现如下所示及安装成功

技术分享图片

\3. 码云的搭配使用

创建代码托管的仓库

技术分享图片

仓库名称,公开(别人也可以看见)

技术分享图片

 

 

相当于在码云上创建了一个文件夹,下面地址可以分享给其他人

技术分享图片

\4. 代码提交到码云上

本地最好创建与码云上创建的仓库同名的文件夹

文件夹内鼠标右键àGit Bash Here

技术分享图片

 

出现如下命令窗口输入

git init 初始化命令,其实就是让git把当前所在的文件夹管理起来

技术分享图片

技术分享图片

 

git add . 将当前所在的文件夹中的所有文件收集起来。

技术分享图片

git commit -m “Python第二天练习” 做个记录

技术分享图片

全局设置,创建仓库,第一次使用Git执行如下命令

git config --global user.email "1720538971@qq.com"

git config --global user.name "FixLee"

git remote add origin https://gitee.com/fixlee95/Python01.git

 

技术分享图片

技术分享图片

技术分享图片

git push -u origin master 上传推送命令

输入码云用户名和密码,代码就传上去了

技术分享图片

 

技术分享图片

 

分享地址可供其他人下载

技术分享图片

命令总结

第一次使用Git

git config --global user.email "1720538971@qq.com"

git config --global user.name "FixLee"

git remote add origin https://gitee.com/fixlee95/Python01.git

 

正常使用

git init

git add .

git commit -m “Python第二天练习”

git push -u origin master

Git安装配合码云的简单使用

原文:https://www.cnblogs.com/lee95/p/12298856.html

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