Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
W
wiki-java
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • 老徐
  • wiki-java
  • Wiki
  • git configuration and simple use

git configuration and simple use · Changes

Page history
meijh created page: git configuration and simple use authored Jun 16, 2016 by 梅俊辉's avatar 梅俊辉
Hide whitespace changes
Inline Side-by-side
Showing with 44 additions and 2 deletions
+44 -2
  • git-configuration-and-simple-use.md git-configuration-and-simple-use.md +44 -2
  • No files found.
git-configuration-and-simple-use.md
View page @ eb0048d1
......@@ -2,7 +2,7 @@ Eclipise中,import〉Project from Git ,单击next <br />
选中Clone URI, Next <br />
![1](http://tech.pingansec.com/ulindows/tech_java/uploads/aabd4da0f580270b68f975978566bd6f/1.png)
<br />
输入uri,user,password <br />
输入uri,user,password,选择HTTP协议 <br />
<br />
![2](http://tech.pingansec.com/ulindows/tech_java/uploads/3fe4f86a6cb5705858ad53f772125304/2.png)
<br />
......@@ -51,11 +51,53 @@ Repository Settings <br />
[branch "test"]
remote = origin
merge = refs/heads/test
'''注意:如果checkout出来的是master分支,则
'注意':如果checkout出来的是master分支,则
[branch "master"]
remote = origin
merge = refs/heads/master
高版本的Eclipse默认会配置好 Repository Settings部分
<br />
<br />
Eclipse Git操作<br />
<br />
提交代码到本地服务器:<br />
选中项目 ,Team> commit <br />
![10](http://tech.pingansec.com/ulindows/tech_java/uploads/a1d82108371aeb0cdc490e60aedace4d/10.png)
<br />
提交代码到远程仓库 <br />
Team > remote > push <br />
![11](http://tech.pingansec.com/ulindows/tech_java/uploads/fb11a733a60f685e53165d1f8971eaa0/11.png)
![12](http://tech.pingansec.com/ulindows/tech_java/uploads/bf925277f6f9cf5ccf2d18a26f6ea71d/12.png)
![13](http://tech.pingansec.com/ulindows/tech_java/uploads/8b04392cfa72657d817ffb629673662d/13.png)
<br />
单击 AddSpec后,Specifications for push下面会出现 一条记录,<br />
记住不要勾选 Force update <br />
后面就直接 next, 再 finish就行了<br />
git 切换分支, <br />
Team > Switch to > 分支名称 <br />
<br />
从远程获仓库获取最新的代码到本地 <br />
Team > pull <br/>
<br />
git解决冲突: <br />
代码在提交到远程仓库之前,先Team> pull 获取最新代码,<br />
![14](http://tech.pingansec.com/ulindows/tech_java/uploads/066944e82eed7a5ccea001840dbfba46/14.png)
此处Test.java提示冲突,
右击Test.java ,单击merge tool <br />
![15](http://tech.pingansec.com/ulindows/tech_java/uploads/60d2b50e49edde07b7062c93f18ca9c9/15.png)
合并、处理代码后,<br />
右击 Test.java, 单击 Add to Git Index <br />
再Commit And Push <br />
![16](http://tech.pingansec.com/ulindows/tech_java/uploads/f80d21801be5f179bcb246233ce8f27c/16.png)
Clone repository
  • git configuration and simple use
  • Home
  • java code specification
  • maven environment configuration
  • shuidi js develope
  • ucs_project environment configuration