黄色网址大全免费-黄色网址你懂得-黄色网址你懂的-黄色网址有那些-免费超爽视频-免费大片黄国产在线观看

Git教程
Git標(biāo)簽管理
Git分支
Git操作
Git應(yīng)用
GitHub應(yīng)用
IDEA對(duì)于Git&GitHub的支持
Git與GitHub使用注意事項(xiàng)

Git隱藏(Stash)操作

假設(shè)您正在為產(chǎn)品新的功能編寫/實(shí)現(xiàn)代碼,當(dāng)正在編寫代碼時(shí),突然出現(xiàn)軟件客戶端升級(jí)。這時(shí),您必須將新編寫的功能代碼保留幾個(gè)小時(shí)然后去處理升級(jí)的問題。在這段時(shí)間內(nèi)不能提交代碼,也不能丟棄您的代碼更改。 所以需要一些臨時(shí)等待一段時(shí)間,您可以存儲(chǔ)部分更改,然后再提交它。

在Git中,隱藏操作將使您能夠修改跟蹤文件,階段更改,并將其保存在一系列未完成的更改中,并可以隨時(shí)重新應(yīng)用。

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

        modified:   main.py

no changes added to commit (use "git add" and/or "git commit -a")

現(xiàn)在,要切換分支以進(jìn)行客戶升級(jí),但不想提交一直在做的工作; 那么可以把當(dāng)前工作的改變隱藏起來。 要將一個(gè)新的存根推到堆棧上,運(yùn)行g(shù)it stash命令。

$ git stash
Saved working directory and index state WIP on master: ef07ab5 synchronized with the remote repository
HEAD is now at ef07ab5 synchronized with the remote repository

現(xiàn)在,工作目錄是干凈的,所有更改都保存在堆棧中。 現(xiàn)在使用git status命令來查看當(dāng)前工作區(qū)狀態(tài)。

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean

現(xiàn)在,可以安全地切換分支并在其他地方工作。通過使用git stash list命令來查看已存在更改的列表。

$ git stash list
stash@{0}: WIP on master: ef07ab5 synchronized with the remote repository

假設(shè)您已經(jīng)解決了客戶升級(jí)問題,想要重新開始新的功能的代碼編寫,查找上次沒有寫完成的代碼,只需執(zhí)行g(shù)it stash pop命令即可從堆棧中刪除更改并將其放置在當(dāng)前工作目錄中。

$ git status -s

Administrator@MY-PC /D/worksp/sample (master)

[jerry@CentOS project]$ git stash pop

上述命令將產(chǎn)生以下結(jié)果:

$ git stash pop
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

        modified:   main.py

no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (e713780380632c142ed5833a9087aca883a826fa)

Administrator@MY-PC /D/worksp/sample (master)

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

        modified:   main.py

no changes added to commit (use "git add" and/or "git commit -a")

可以看到,工作區(qū)中修改的文件(main.py)又顯示了。現(xiàn)在我們就可以繼續(xù)編寫上次編寫了未完成的代碼。

全部教程
主站蜘蛛池模板: 伊人婷婷色香五月综合缴激情 | www.黄色免费| 亚洲视频在线免费播放 | 91免费精品视频 | 国产日韩精品一区二区 | 18pao国产成视频永久免费 | 日本一道本在线视频 | 亚洲国产日韩欧美 | 成人羞羞视频免费看看 | 亚洲不卡影院 | 欧美黑人性色黄在线视频 | 成人免费视频观看无遮挡 | 少妇人妻挤奶水中文视频毛片 | 成人高清在线视频 | 久久777国产线看是看精品 | 亚洲欧美一区二区三区国产精品 | 中文一区在线观看 | 亚洲一级毛片在线观 | 人人成人免费公开视频 | 最近中文字幕免费mv在线视频 | 性猛交xxxxx按摩 | 午夜影院操 | 三级黄色小视频 | 国产成人在线视频观看 | 久久成人亚洲 | 黄网站视频观看免费 | 成人在线精品视频 | 日韩欧美亚洲视频 | 性欧美.video.free| 手机在线观看你懂得 | 三级三级三级a级全黄公司的 | 一级片在线免费播放 | 亚洲视频中文字幕 | 看黄的网址 | 国产亚洲高清在线精品99 | 亚洲国产情侣偷自在线二页 | 日韩人成免费网站大片 | 亚洲手机在线 | 久久99一区| 黄色小视频在线看 | 中文字幕欧美日韩一 |