免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
鮮為人知的 GitHub 使用技巧

GitHub 大家常上吧?可是使用 GitHub 的各種小竅門(mén)你就不一定知道了。本文將各種使用 GitHub 的小竅門(mén)分享給大家。

diff時(shí)忽略空格

有些修改只是增減了空格,在URL中添加?w=1就可以忽略。

查看某個(gè)作者的提交歷史

在URL中添加?author=username,例如:

  1. https://github.com/rails/rails/commits/master?author=dhh 

比較版本

使用類(lèi)似如下的URL比較分支:

  1. https://github.com/rails/rails/compare/master...4-1-stable 

同樣可以使用一下格式:

  1. https://github.com/rails/rails/compare/master@{1.day.ago}...master 
  2. https://github.com/rails/rails/compare/master@{2014-10-04}...master 

如果想和派生倉(cāng)庫(kù)比較,加上派生倉(cāng)庫(kù)名作前綴即可:

  1. https://github.com/rails/rails/compare/byroot:master...master 

通過(guò) HTML 方式嵌入 Gist

Gists是 GitHub 推出的基于 Git 的代碼片段服務(wù)。Gists頁(yè)面提供JavaScript代碼,可以將 Gist 嵌入到其他站點(diǎn)。但是很多站點(diǎn)粘貼 JavaScript 無(wú)效,這時(shí)候你可以在 Gist URL 后附加.pibb,得到一個(gè)純 HTML 的版本,然后就可以復(fù)制粘貼 HTML 源碼到其他網(wǎng)站了。例如 https://gist.github.com/tiimgreen/10545817.pibb

Git.io

Git.io 是適用于 GitHub 的短網(wǎng)址服務(wù)。

當(dāng)然,為了方便,也可以使用Curl訪(fǎng)問(wèn):

  1. $ curl -i http://git.io -F "url=https://github.com/..." 
  2. HTTP/1.1 201 Created 
  3. Location: http://git.io/abc123 
  4.   
  5. $ curl -i http://git.io/abc123 
  6. HTTP/1.1 302 Found 
  7. Location: https://github.com/... 

你甚至可以指定短網(wǎng)址的字段:

  1. $ curl -i http://git.io -F "url=https://github.com/technoweenie" \ 
  2.     -F "code=t
  3. HTTP/1.1 201 Created 
  4. Location: http://git.io/t 

高亮行

例如,在 URL 中加上 #L52 可以高亮第52行?;蛘吣阋部梢灾苯狱c(diǎn)擊行數(shù)。

多行高亮同樣支持。你可以使用類(lèi)似#L53-L60格式,或者在按住shift的同時(shí)點(diǎn)擊。

  1. https://github.com/rails/rails/blob/master/activemodel/lib/active_model.rb#L53-L60 

快速引用

你可以選中別人的評(píng)論文字,然后按r,這些內(nèi)容會(huì)以引用的形式被復(fù)制在文本框中:

任務(wù)列表

在工單或合并請(qǐng)求中,你可以使用任務(wù)列表語(yǔ)法:

  1. - [ ] Be awesome 
  2. - [ ] Do stuff 
  3. - [ ] Sleep 

勾選之后,會(huì)更新 Markdown:

  1. - [x] Be awesome 
  2. - [x] Do stuff 
  3. - [ ] Sleep 

合并請(qǐng)求的 diff 和 patch

可以在 URL 后添加 .diff 和 .patch,以對(duì)應(yīng)的模式查看合并請(qǐng)求:

  1. https://github.com/tiimgreen/github-cheat-sheet/pull/15 
  2. https://github.com/tiimgreen/github-cheat-sheet/pull/15.diff 
  3. https://github.com/tiimgreen/github-cheat-sheet/pull/15.patch 

結(jié)果是純文本的:

  1. diff --git a/README.md b/README.md 
  2. index 88fcf69..8614873 100644 
  3. --- a/README.md) 
  4. +++ b/README.md 
  5. @@ -28,6 +28,7 @@ All the hidden and not hidden features of Git and GitHub. This cheat sheet was i 
  6.  - [Merged Branches](#merged-branches) 
  7.  - [Quick Licensing](#quick-licensing) 
  8.  - [TODO Lists](#todo-lists) 
  9. +- [Relative Links](#relative-links) 
  10.  - [.gitconfig Recommendations](#gitconfig-recommendations) 
  11.      - [Aliases](#aliases) 
  12.      - [Auto-correct](#auto-correct) 
  13. @@ -381,6 +382,19 @@ When they are clicked, they will be updated in the pure Markdown: 
  14.  - [ ] Sleep 
  15.   
  16. (...) 

編撰 SegmentFault
參考 github-cheat-sheet 

via : http://segmentfault.com/a/1190000000475547 


本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
關(guān)于 Git 和Github ,你所不知道的十件事
關(guān)于 Linux中Git等知識(shí)的一些筆記
[干貨](méi)如何在一天之內(nèi)搭建以你自己名字為域名且具備cool屬性的個(gè)人博客
二、利用Git將GitHub上的項(xiàng)目拉下項(xiàng)目
有哪些在線(xiàn)編程練習(xí)網(wǎng)站?
如何搭建自己的中文Git版本庫(kù):Gitlab容器化部署
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服