# 测试1 **Repository Path**: junjunjun1234/test_1 ## Basic Information - **Project Name**: 测试1 - **Description**: Gitee使用说明 - **Primary Language**: Android - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-11-15 - **Last Updated**: 2021-07-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Gitee使用说明 #### 项目介绍 用于第一次测试 # gitee 和git的使用帮助 1. Git 的安装 从 [http://git-scm.com/download](http://git-scm.com/download) 上下载window版的客户端,然后一直下一步下一步安装git即可,请注意,如果你不熟悉每个选项的意思,请保持默认的选项 2.验证Git安装 ``` C:\Users\macaupass>git --version git version 2.20.1.windows.1 ``` 3.创建远程代码仓库 4. Git 首次使用前的配置(首次配置后以后无需配置) #在使用git前,我们需要告诉git自己是谁以及自己的邮箱是什么,所以我们需要对git进行一些基本设置。打开终端(Windows打开安装git时安装的git bash)执行如下命令 ``` git config --global user.name "我有点帅哦" #归属 git config --global user.email "1543995180@qq.com" #邮箱 ``` 5.创建本地代码仓库 ``` #初始化版本库的文件夹中执行 a. 新建 testgit 目录 b. cd testgit c. 初始化 C:\Study\git_project\testgit> git init Initialized empty Git repository in C:/Study/git_project/testgit/.git/ d. 进行代码托管 git remote add origin https://gitee.com/junjunjun1234/record.git #项目地址形式为:https://gitee.com/xxx/xxx.git或者 git@gitee.com:xxx/xxx.git e. 拉取远程代码库 #由于在创建远程仓库时会初始化一个README.md文件,而本地仓库里没有,所以需要先执行pull操作将远程仓库拉取合并到本地仓库,否则会出错。执行代码: git pull origin master git add . git commit -m "第一次提交" git push origin master or #按照本文档新建的项目时,在码云平台仓库上已经存在 readme 文件,故在提交时可能会存在冲突,这时您需要选择的是保留线上的文件或者舍弃线上的文件,如果您舍弃线上的文件,则在推送时选择强制推送,强制推送需要执行下面的命令 git push origin master -f ``` 6.克隆一个项目 ``` git clone https://gitee.com/xag/testgit.git ``` ## eclipse 设置 Preferences > Team > Git > Configuration ## eclipse 上传 项目右键>team>commit # 相关证书 见[自由软件基金会网站](https://www.gnu.org/licenses/licenses.html)