一:本地项目托管到gitee - 第一次提交

开发工具:Android studio 3.2.1 for Mac,终端工具:iTerm2

二:本地项目托管到gitee - 分支管理(终端)https://blog.csdn.net/qq_33152517/article/details/90713131


命令行小结

初始化git:git config --global user.name "你的名字或昵称"

                  git config --global user.email "你的邮箱"

                  cd Desktop/demo

                  git init

链接远程仓库:git remote add gitee <你的项目地址> //注:项目地址形式为:https://gitee.com/xxx/xxx.git或者                               [email protected]:xxx/xxx.git

拉取代码:git pull gitee master

提交代码:git add .

                 git commit -m "第一次" ,(双引号不能问中文符号,中文符号会出现 dquote> 提示)

                 git push gitee master。

 

一:Android studio 插件一键分享,二:终端命令行

Android studio 插件一键分享到gitee(码云)

1、新建一个项目-demo

一:本地项目托管到gitee - 第一次提交_第1张图片

2、安装插件 - gitee

一:本地项目托管到gitee - 第一次提交_第2张图片

3、登录gitee账号

一:本地项目托管到gitee - 第一次提交_第3张图片

4、点击Vcs -> Import into Version Control -> Share Project on Gitee,会出现提示窗,一路点击ok按钮就可以将本地代码提交到gitee。

一:本地项目托管到gitee - 第一次提交_第4张图片

*可以提前设置提交代码时的过滤文件

一:本地项目托管到gitee - 第一次提交_第5张图片

终端命令行将本地项目托管到gitee

1、新建项目 - demo

一:本地项目托管到gitee - 第一次提交_第6张图片

2、在gitee上新建仓库-demo

3、告诉git你是谁,执行命令

git config --global user.name "你的名字或昵称"

*名字不可是中文

git config --global user.email "你的邮箱"

4、cd到本地项目的文件夹>>>,

cd Desktop/demo

初始化本地项目,执行命令

git init

5、链接远程仓库,执行命令

git remote add gitee <你的项目地址> //注:项目地址形式为:https://gitee.com/xxx/xxx.git或者 [email protected]:xxx/xxx.git

错误1:remote gite already exists.,解决方案:https://blog.csdn.net/qq_33152517/article/details/90700387

6、完成第一次提交,拉取远程仓库代码,执行命令 ( 出现确认提示,输入yes,回车)。

git pull gitee master

将修改后的代码提交到缓存区,执行命令 

git add .

git commit -m "第一次" ,(双引号不能问中文符号,中文符号会出现 dquote> 提示)

 git push gitee master。

错误1:fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.
,解决方案:https://blog.csdn.net/qq_33152517/article/details/90700640

 

你可能感兴趣的:(git,gitee)