git命令和smartgit使用介绍

上传人:n**** 文档编号:94599137 上传时间:2019-08-09 格式:PDF 页数:33 大小:1.15MB
返回 下载 相关 举报
git命令和smartgit使用介绍_第1页
第1页 / 共33页
git命令和smartgit使用介绍_第2页
第2页 / 共33页
git命令和smartgit使用介绍_第3页
第3页 / 共33页
git命令和smartgit使用介绍_第4页
第4页 / 共33页
git命令和smartgit使用介绍_第5页
第5页 / 共33页
点击查看更多>>
资源描述

《git命令和smartgit使用介绍》由会员分享,可在线阅读,更多相关《git命令和smartgit使用介绍(33页珍藏版)》请在金锄头文库上搜索。

1、 1 1.? git clone 2 2. smart git ? 3 2.1 ? smart git . 3 2.2 ? log . 4 2.3 ? . 6 2.4 ? Push 7 2.5 ? git pull? . 7 2.6 ? merge 9 2.6 ? . 10 2.6.1 Modified in working tree . 10 2.6.2 Modified in Index 10 2.6.3 local change 11 2.6.4 file status . 11 3. ? . 12 3.1 ? git status 12 3.2 ? git add . 12 3.3 ?

2、 git commit m “?” . 13 3.4 ? git add 13 3.5 ? git diff 13 3.6 ? git rm . 14 3.7 ?git mv. 15 4. ? . 15 4.1 ? git remote . 15 4.2 ? git fetch 16 所.情 ? git push . 16 4.4 ? git remote show 17 4.5 ? git remote rename , git remote rm . 17 5. git ? 17 5.1 ? git branch . 17 5.2 ? git branch branchname . 18

3、5.3 ? git merge . 18 5.4 ? 18 5.5 ? git push origin branchname . 19 5.6 ? git push origin :branchname . 20 5.7 ? git merge origin/test11 20 5.8 ? 21 5.9 ? work directory 21 6.git ? git reset ,git revert 22 6.1 ? git reset . 22 6.1.1 ? 23 6.1.2 ? 23 6.1.3 ? 25 6.1.3.1 ? index ? working directory . 25

4、 6.1.3.2 ? . 25 2 6.1.3.3 ? 26 6.1.3.4 ? commit . 26 6.1.3.5 ? merge . 27 6.1.3.6 ? merge ,? working tree . 27 6.1.3.7 ? 28 6.2 ? 29 6.3 git revert ? reset ? . 30 7. index ? working directory 30 7.1 git diff 31 1.? git clone ? 自it ? git clone git10.219.68.248:testing 3 2. smart git ? 2.1 从程序中启动从程序中启

5、动从程序中启动从程序中启动 smart git ? Project Open Repository ? ? clone ? git ? next ? finish? 4 2.2 查看查看查看查看 log Query - Open 5 6 2.3 选择分支选择分支选择分支选择分支 ?( git branch uidp3457) ? add Branch ? ? Add Branch fix conflicts and then commit the result. $ git reset -hard (2) /? index ? working tree ? $ git pull . topic

6、/branch (3) / (? topic/branch ?) Updating from 41223. to 13134. Fast-forward $ git reset -hard ORIG_HEAD (4) /? merge ? (1) ? origin ? ? pull? (2) ? pull ? pull ? stage area ? ? git reset -hard ? git reset -hard HEAD ? index ? working tree ? (3) ?topic/branch?branch? ? ? (4) ? topic/branch ? merge?

7、git reset -hard ORIG_HEAD ? pull/merge ? git reset ? git ? reset ? HEAD ?.git/ORIG_HEAD ? ? ORIG_HEAD ? commit? pull ? merge ?git ? HEAD ? ? ORIG_HEAD ? 6.1.3.6 ? merge ,? working tree F) ? working tree ? merge ? pull 28 ? $ git pull (1) Auto-merging nitfol Merge made by recursive. nitfol | 20 +- .

8、$ git reset -merge ORIG_HEAD (2)/ ? working tree (1) ? working tree? git pull? ? pull ? working tree ? (2) git pull ? pull ? pull ? ? git reset -hard ORIG_HEAD? ? working tree? add ? working tree ? git reset -merge ORIG_HEAD?-hard ? -merge? ? working tree? 6.1.3.7 ? G) ? ? ? feature? ? bug ? working

9、 tree ? commit? ? branch ? fix bug? ? $ git checkout feature ;# you were working in “feature“ branch and $ work work work ;# got interrupted $ git commit -a -m “snapshot WIP“ (1) /? $ git checkout master $ fix fix fix $ git commit ;# commit with real log $ git checkout feature $ git reset -soft HEAD

10、 ;# go back to WIP state (2) /? $ git reset (3)/? index (1) ? (2) ? reset ? WIP commit? working tree ? WIP ? ? 29 (3) ? index ?“snapshot WIP”? uncommit changes?git reset ? index ?“snapshot WIP“? (I) ? working tree ? commit ? working tree ? branch? commit ? ? branch? working tree ? ? $ git tag start

11、$ git checkout -b branch1 $ edit $ git commit . (1) $ edit $ git checkout -b branch2 (2) $ git reset -keep start (3)/ ? start ? commit ? working tree ? (1) ? branch1 ? (2) ? ? branch? ? branch2? ? branch2 ? (3) ? reset -keep ? start ? commit ? ? working tree ? 6.2 恢复恢复恢复恢复撤销撤销撤销撤销 $ git reset -hard HEAD HEAD is now at 1a75c1d. added file1 $ cat file2 cat: file2: No such file or director

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号