记一次使用Git上传本地项目到码云

一、如果是第一次使用,请先打开Git安装目录下的git-bash.exe,执行下面这一步

Git 全局设置:

git config --global user.name "你的用户名"
git config --global user.email "你的邮箱地址"

二、上传本地项目到码云

1.右键本地项目->Git Bash Here

2.在命令窗口使用git init命令,初始化一个git本地仓库(项目),会在本地创建一个.git的文件夹。

3.使用git remote add origin https://gitee.com/码云用户名/项目名.git添加远程仓库。

4.使用git pull origin master命令,将码云上的仓库pull到本地文件夹。

5.使用git add .或者git add + 文件名(注:git add .添加所有文件)。

6.使用git commit -m “first commit”完成提交。

7.使用git push origin master命令,将本地仓库推送到远程仓库。

三、将远程仓库项目克隆到本地

1.新建空的文件夹

2.右键新建好的文件夹->Git Bash Here

3.使用git clone 远程仓库地址

这里写图片描述

这里写图片描述

猜你喜欢

转载自blog.csdn.net/hkhhkb/article/details/79830552
今日推荐