自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

分布式控制系統(tǒng)github技巧

系統(tǒng) Linux 分布式
作為開源代碼庫以及版本控制系統(tǒng),Github目前擁有140多萬開發(fā)者用戶。隨著越來越多的應(yīng)用程序轉(zhuǎn)移到了云上,Github已經(jīng)成為了管理軟件開發(fā)以及發(fā)現(xiàn)已有代碼的首選方法。

diff時忽略空格

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

查看某個作者的提交歷史

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

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

比較版本

使用類似如下的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 

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

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

通過 HTML 方式嵌入 Gist

Gists是 GitHub 推出的基于 Git 的代碼片段服務(wù)。Gists頁面提供JavaScript代碼,可以將 Gist 嵌入到其他站點。但是很多站點粘貼 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/..."HTTP/1.1 201 Created  
  2. Location: http://git.io/abc123  
  3.  
  4. $ curl -i http://git.io/abc123  
  5. HTTP/1.1 302 Found  
  6. 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擊行數(shù)。

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

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

快速引用

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

任務(wù)列表

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

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

 

勾選之后,會更新 Markdown:

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

合并請求的 diff 和 patch

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

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

附上github的一篇github技巧文章:https://github.com/tiimgreen/github-cheat-sheet

原文鏈接:http://my.oschina.net/lgmcolin/blog/296589

責(zé)任編輯:牛小雨 來源: GM_LV的博客
相關(guān)推薦

2011-04-08 10:10:23

2011-01-26 09:09:06

版本控制系統(tǒng)GitLinux

2023-04-05 00:08:03

2023-05-29 14:07:00

Zuul網(wǎng)關(guān)系統(tǒng)

2023-05-12 08:23:03

分布式系統(tǒng)網(wǎng)絡(luò)

2017-10-27 08:40:44

分布式存儲剪枝系統(tǒng)

2023-10-26 18:10:43

分布式并行技術(shù)系統(tǒng)

2023-02-11 00:04:17

分布式系統(tǒng)安全

2017-10-17 08:33:31

存儲系統(tǒng)分布式

2011-04-18 14:43:23

分布式測試分布式測試

2010-03-24 17:07:52

無線分布式系統(tǒng)

2019-08-05 07:58:01

分布式架構(gòu)系統(tǒng)

2010-11-01 05:50:46

分布式文件系統(tǒng)

2023-02-23 07:55:41

2022-04-06 08:00:00

GitHubGitLab開發(fā)

2019-10-10 09:16:34

Zookeeper架構(gòu)分布式

2017-09-01 05:35:58

分布式計算存儲

2019-06-19 15:40:06

分布式鎖RedisJava

2023-04-26 08:01:09

分布式編譯系統(tǒng)

2019-07-17 22:23:01

分布式系統(tǒng)負(fù)載均衡架構(gòu)
點贊
收藏

51CTO技術(shù)棧公眾號