码迷,mamicode.com
首页 > 其他好文 > 详细

Git使用

时间:2018-07-10 17:41:27      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:其他   strong   android   origin   nbsp   参考   master   blob   int   

一、基本的Git拉去提交代码:

1.首先下载安装git

技术分享图片

2.点击安装目录下的Git Bash,如下图配置身份,如下图检测身份:

技术分享图片

 

 二.创建远程仓库和协同办公(这里以github为例,其他远程仓库类似):

1.参考 http://www.jianshu.com/p/3e6094c15a46 中的第一种方式

(1).VCS--Enable Version Control Integration--Git
(2).配置好gitignore文件,.gitignore插件生成的可以再加上:
1 /.idea/gradle.xml
2 /.idea/modules.xml

技术分享图片这个文件系统会提示,也要把它添加进去,这样每次你新建东西,系统会默认给你添加到版本控制,很方便~

(3).右键Git-->Add
(4).Git-->Commit Directory提交到本地仓库
(5).Git->Repository-->fetch
(6).绑定:git branch --set-upstream-to origin/master
(7). 允许拉取不相关的历史记录:git pull --allow-unrelated-histories
(8).Git-->Repository-->push
 
 
2.在github项目地址设置协同者,如下 所示:

 技术分享图片

 3.搜索协同者github账户------>添加------>邀请------>对方接受------>OK

 

Git使用

标签:其他   strong   android   origin   nbsp   参考   master   blob   int   

原文地址:https://www.cnblogs.com/jeffery336699/p/9290122.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!