欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

GitHub使用技巧有哪些

本篇內(nèi)容主要講解“GitHub使用技巧有哪些”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“GitHub使用技巧有哪些”吧!

創(chuàng)新互聯(lián)是專業(yè)的鄧州網(wǎng)站建設(shè)公司,鄧州接單;提供成都網(wǎng)站建設(shè)、成都做網(wǎng)站,網(wǎng)頁設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行鄧州網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來合作!

原標(biāo)題:少有人知的 GitHub 使用技巧

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

diff時忽略空格

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

查看某個作者的提交歷史

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

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

比較版本

使用類似如下的URL比較分支:

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

同樣可以使用一下格式:

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

如果想和派生倉庫比較,加上派生倉庫名作前綴即可:

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

通過 HTML 方式嵌入 Gist

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

Git.io

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

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

  1. $ curl -i http://git.io -F "url=https://github.com/..."

  2. HTTP/1.1201Created

  3. Location: http://git.io/abc123

  4. $ curl -i http://git.io/abc123

  5. HTTP/1.1302Found

  6. Location: https://github.com/...

   

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

$ curl -i http://git.io -F "url=https://github.com/technoweenie" \-F "code=t"HTTP/1.1201CreatedLocation: http://git.io/t
   

高亮行

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

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

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

快速引用

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

任務(wù)列表

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

-[]Be awesome-[]Do stuff-[]Sleep
     

勾選之后,會更新 Markdown:

-[x]Be awesome-[x]Do stuff-[]Sleep
   

合并請求的 diff 和 patch

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

https://github.com/tiimgreen/github-cheat-sheet/pull/15https://github.com/tiimgreen/github-cheat-sheet/pull/15.diffhttps://github.com/tiimgreen/github-cheat-sheet/pull/15.patch
   

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

  1. diff --git a/README.md b/README.md

  2. index 88fcf69..8614873100644

  3. --- a/README.md)

  4. +++ b/README.md

  5. @@-28,6+28,7@@All the hidden andnot hidden features of GitandGitHub.This cheat sheet was i

  6. -[MergedBranches](#merged-branches)

  7. -[QuickLicensing](#quick-licensing)

  8. -[TODO Lists](#todo-lists)

  9. +-[RelativeLinks](#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. (...)

    

到此,相信大家對“GitHub使用技巧有哪些”有了更深的了解,不妨來實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!

網(wǎng)站題目:GitHub使用技巧有哪些
網(wǎng)址分享:http://chinadenli.net/article12/gjccgc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)網(wǎng)站制作、網(wǎng)站營銷手機(jī)網(wǎng)站建設(shè)、網(wǎng)站排名、用戶體驗(yàn)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站制作