26
26
- [ 画像及びアニメーションGIF] ( #%E7%94%BB%E5%83%8F%E5%8F%8A%E3%81%B3%E3%82%A2%E3%83%8B%E3%83%A1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3gif )
27
27
- [ GitHub Wikiへの画像の添付] ( #github-wiki%E3%81%B8%E3%81%AE%E7%94%BB%E5%83%8F%E3%81%AE%E6%B7%BB%E4%BB%98 )
28
28
- [ 素早く引用] ( #%E7%B4%A0%E6%97%A9%E3%81%8F%E5%BC%95%E7%94%A8 )
29
+ - [ コメントへのクリップボードの画像の追加] ( #%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E3%81%B8%E3%81%AE%E3%82%AF%E3%83%AA%E3%83%83%E3%83%97%E3%83%9C%E3%83%BC%E3%83%89%E3%81%AE%E7%94%BB%E5%83%8F%E3%81%AE%E8%BF%BD%E5%8A%A0 )
29
30
- [ 設定済みライセンスの追加] ( #%E8%A8%AD%E5%AE%9A%E6%B8%88%E3%81%BF%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9%E3%81%AE%E8%BF%BD%E5%8A%A0 )
30
31
- [ タスクリスト] ( #%E3%82%BF%E3%82%B9%E3%82%AF%E3%83%AA%E3%82%B9%E3%83%88 )
31
32
- [ Markdownファイルでのタスクリスト] ( #markdown%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%A7%E3%81%AE%E3%82%BF%E3%82%B9%E3%82%AF%E3%83%AA%E3%82%B9%E3%83%88 )
@@ -74,13 +75,13 @@ GitHub上で差分ページを表示している時、そのURLに`?w=1`を加
74
75
[ * GitHubの秘密についてもっと詳しく* ] ( https://github.com/blog/967-github-secrets )
75
76
76
77
### タブ幅の調節
77
- 差分やファイルを表示している時、URLに` ?ts=4 ` を追加するとタブを空白4つの幅で表示する。デフォルトは8つだ。` ts ` に指定した数で表示されるということだ。これはGistやrawファイルを表示している時には適用されない 。
78
+ 差分やファイルを表示している時、URLに` ?ts=4 ` を追加するとタブを空白4つの幅で表示する。デフォルトは8つだ。` ts ` に指定した数で表示されるということだ。これはGistやrawファイルを表示している時には適用されないが、 [ Chrome ] ( https://chrome.google.com/webstore/detail/github-tab-size/ofjbgncegkdemndciafljngjbdpfmbkn ) と [ Operaの拡張 ] ( https://addons.opera.com/en/extensions/details/github-tab-size/ ) をインストールすることにより、対応することができる 。
78
79
79
- 例えば [ Goのソースファイル ] ( https://github.com/pengwynn/flint/blob/master/flint/flint.go ) を表示している時 、` ?ts=4 ` を追加する前はこのように表示されるが:
80
+ 例えばGoのソースファイルを表示している時 、` ?ts=4 ` を追加する前はこのように表示されるが:
80
81
81
82
![ Before, tab space example] ( http://i.imgur.com/GIT1Fr0.png )
82
83
83
- ` ?ts=4 ` を [ 追加すると ] ( https://github.com/pengwynn/flint/blob/master/flint/flint.go?ts=4 ) このように表示される :
84
+ ` ?ts=4 ` を追加するとこのように表示される :
84
85
85
86
![ After, tab space example] ( http://i.imgur.com/70FL4H9.png )
86
87
@@ -90,7 +91,7 @@ GitHub上で差分ページを表示している時、そのURLに`?w=1`を加
90
91
```
91
92
https://github.com/rails/rails/commits/master?author=dhh
92
93
```
93
- ![ DHH commit history] ( http://i.imgur.com/mDWwuaY .png )
94
+ ![ DHH commit history] ( http://i.imgur.com/S7AE29b .png )
94
95
95
96
[ * コミット・ビューの違いについてもっと詳しく* ] ( https://help.github.com/articles/differences-between-commit-views )
96
97
@@ -115,21 +116,7 @@ https://github.com/{user}/{repo}/branches
115
116
116
117
このページからボタンをクリックしてブランチ比較ページへ移動したりブランチを削除することができる。
117
118
118
- ![ Compare branches not merged into master in jquery/jquery repo - https://github.com/jquery/jquery/branches ] ( http://i.imgur.com/gKWPe8a.png )
119
-
120
- しかしながら` master ` 以外、(例えば` development ` )のブランチと比較したい場合もあるだろう。その場合、以下のようにURLの最後にそのブランチ名を追加すれば良い:
121
-
122
- ```
123
- https://github.com/{user}/{repo}/branches/{branch}
124
- ```
125
-
126
- ![ Compare branches not merged into ` 1.x-master ` in jquery/jquery repo - https://github.com/jquery/jquery/branches/1.x-master ] ( http://i.imgur.com/jpc6Urb.png )
127
-
128
- マージ済みのブランチを表示するには` ?merged=1 ` をURLに追加する。
129
-
130
- ![ Compare branches merged in to ` 1.x-master ` in jquery/jquery repo - https://github.com/jquery/jquery/branches/1.x-master?merged=1 ] ( http://i.imgur.com/KmYyCVh.png )
131
-
132
- このビューでは、コマンドラインを使うことなく簡単にページ上でブランチを削除することができるだろう。
119
+ ![ Compare branches not merged into master in rails/rails repo - https://github.com/rails/rails/branches ] ( http://i.imgur.com/0FEe30z.png )
133
120
134
121
#### ブランチ同士の比較
135
122
GitHubのブランチ比較は以下のようなURLで提供されている:
@@ -145,7 +132,7 @@ https://github.com/{user}/{repo}/compare/{range}
145
132
```
146
133
https://github.com/rails/rails/compare/master...4-1-stable
147
134
```
148
- ![ Rails branch compare example] ( http://i.imgur.com/0Z52X5Y .png )
135
+ ![ Rails branch compare example] ( http://i.imgur.com/tIRCOsK .png )
149
136
150
137
` {range} ` には以下のように変更することもできる:
151
138
@@ -158,7 +145,12 @@ https://github.com/rails/rails/compare/master@{2014-10-04}...master
158
145
159
146
![ Another compare example] ( http://i.imgur.com/5dtzESz.png )
160
147
161
- するとmasterブランチと特定の期間または日時との比較が行えるだろう。
148
+ ` diff ` や` patch ` のビューでもブランチを利用して比較することができる:
149
+
150
+ ```
151
+ https://github.com/rails/rails/compare/master...4-1-stable.diff
152
+ https://github.com/rails/rails/compare/master...4-1-stable.patch
153
+ ```
162
154
163
155
[ * 時間を指定してのブランチ比較についてもっと詳しく* ] ( https://help.github.com/articles/comparing-commits-across-time )
164
156
@@ -184,22 +176,24 @@ https://github.com/rails/rails/compare/byroot:master...master
184
176
185
177
GistのURLの最後に` .pibb ` を付ける([ 例] ( https://gist.github.com/hail2u/9477708.pibb ) )と* HTMLのみ* のバージョンが表示されるので、そのソースは他のウェブサイトに貼り付けるにはもってこいだろう。
186
178
187
- 簡単なものとはいえ、完全なGitリポジトリとして機能するため 、以下のようにすれば普通のGitリポジトリと同じようにクローンすることができる:
179
+ 簡単なものとはいえ、Gitリポジトリとして機能するため 、以下のようにすれば普通のGitリポジトリと同じようにクローンすることができる:
188
180
189
181
``` bash
190
182
$ git clone https://gist.github.com/tiimgreen/10545817
191
183
```
192
184
193
- ![ Gists] ( http://i.imgur.com/dULZXXo .png )
185
+ ![ Gists] ( http://i.imgur.com/BcFzabp .png )
194
186
195
187
This means you also can modify and push updates to Gists:
196
188
197
189
``` bash
198
190
$ git commit
191
+ $ git push
199
192
Username for ' https://gist.github.com' :
200
193
Password for ' https://tiimgreen@gist.github.com' :
201
194
```
202
195
196
+ しかしながら、Gistではディレクトリーがサポートされていない。全てのファイルはリポジトリーのルートに置かれている必要がある。
203
197
204
198
[ * Gistの作成についてもっと詳しく* ] ( https://help.github.com/articles/creating-gists )
205
199
@@ -227,15 +221,15 @@ Location: https://github.com/...
227
221
228
222
- ` t ` を押すとファイルの検索インターフェイスが起動する。
229
223
- ` w ` を押すとブランチ選択インターフェイスが起動する。
230
- - ` s ` を押すとコマンド・バーにフォーカスが当たる。
224
+ - ` s ` を押すと現在閲覧しているリポジトリーから検索するフォームにフォーカスが当たる。ここでBackspaceを押し「This repository」という文字列を消すことでGitHub全体からの検索へと切り替えることができる
231
225
- issue画面で` l ` を押すとラベルの編集インターフェイスが開かれる。
232
226
- __ ファイルを参照している時__ (例: ` https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.md ` )に` y ` を押すと、参照している時の状態で固定されるURLに変更される。つまりそのファイルのコードが後に変化したとしても、そのURLでは今とまったく同じ状態で表示されるということだ。
233
227
234
228
` ? ` を押すとそのページで使える全ショートカットが表示されるだろう。
235
229
236
230
![ Keyboard shortcuts] ( http://i.imgur.com/y5ZfNEm.png )
237
231
238
- [ * コマンドバーについてもっと詳しく * ] ( https://help.github.com/articles/using-the-command-bar )
232
+ [ * 検索機能についてもっと詳しく * ] ( https://help.github.com/articles/search-syntax/ )
239
233
240
234
### コードの指定行の強調
241
235
コードのURLの末尾に` #L52 ` と付けるか行番号をクリックすると、その行が強調表示される。
@@ -312,14 +306,6 @@ GitHubでは[Linguist](https://github.com/github/linguist)を使って言語を
312
306
### Emoji
313
307
Emojiはpull requestやissue、READMEなどで` :name_of_emoji: ` と書くと利用できる:
314
308
315
- ```
316
- :smile:
317
- ```
318
-
319
- こう書くと以下のように表示される:
320
-
321
- :smile :
322
-
323
309
GitHubでサポートされているEmojiの完全なリストは[ Emoji cheat sheet for Campfire and GitHub] ( http://www.emoji-cheat-sheet.com/ ) か[ All-Github-Emoji-Icons] ( https://github.com/scotch-io/All-Github-Emoji-Icons ) で確認できる。
324
310
325
311
GitHubで使われているEmojiのトップ5は以下の通りだ:
@@ -365,6 +351,16 @@ issueのスレッドで他の人のコメントを引用してコメントした
365
351
366
352
[ * 素早く引用する方法についてもっと詳しく* ] ( https://github.com/blog/1399-quick-quotes )
367
353
354
+ ### コメントへのクリップボードの画像の追加
355
+
356
+ _ (Chrome系のブラウザーのみで動作)_
357
+
358
+ スクリーンショットをクリップボードに保存(mac: ` cmd-ctrl-shift-4 ` )した後、その画像はコメント投稿フォームで貼り付け(` cmd-v ` または` ctrl-v ` )ることができ、自動的にGitHubへアップロードされます。
359
+
360
+ ![ Pasting Clipboard Image to Comments] ( https://cloud.githubusercontent.com/assets/39191/5794265/39c9b65a-9f1b-11e4-9bc7-04e41f59ea5f.png )
361
+
362
+ [ * コメントへのクリップボードの画像の追加についてもっと詳しく* ] ( https://help.github.com/articles/issue-attachments )
363
+
368
364
### 設定済みライセンスの追加
369
365
GitHub上でリポジトリを作成する時、あらかじめ設定されているライセンスを追加することもできる:
370
366
@@ -546,13 +542,6 @@ $ git clone https://github.com/tiimgreen/toc.git
546
542
547
543
[ * Hubが提供する便利な機能についてもっと詳しく* ] ( https://github.com/github/hub#commands )
548
544
549
- ### 共同開発者との摩擦の軽減
550
- もし誰かに自分のプロジェクトの利用またはその開発に参加してもらいたい場合、まずはよくある質問に答えることから始めなければならないだろう。このプロジェクトはどういうものなのか?どうやって使うのか?どのように使っても良いのか?どうやれば開発に参加できるのか?どうやれば開発環境を用意できるのか?どうやって自分の加えた機能が既存の機能を破壊しないことが確認できるのか?
551
-
552
- [ Friction] ( https://github.com/rafalchmiel/friction ) はこういった[ 一般的な質問に対しての答え] ( https://github.com/rafalchmiel/friction/wiki ) が用意されているかをチェックしてくれるコマンドライン・ツールだ。例えば以下のような出力を得られる:
553
-
554
- [ ![ Friction output] ( http://i.imgur.com/4EgpWo4.png )] ( https://github.com/rafalchmiel/friction )
555
-
556
545
### 開発参加のガイドライン
557
546
リポジトリのルートに` CONTRIBUTING ` という名前のファイルを置くと、issueやpull requestを作成しようとした時にそれへのリンクが表示されるようになる。
558
547
@@ -696,7 +685,7 @@ $ git status
696
685
697
686
このように表示されるが:
698
687
699
- ![ git status] ( http://i.imgur.com/o3PEHAA .png )
688
+ ![ git status] ( http://i.imgur.com/qjPyvXb .png )
700
689
701
690
` -sb ` を追加することによって:
702
691
@@ -706,7 +695,7 @@ $ git status -sb
706
695
707
696
このように表示することもできる:
708
697
709
- ![ git status -sb] ( http://i.imgur.com/xNI1bT0 .png )
698
+ ![ git status -sb] ( http://i.imgur.com/K0OY3nm .png )
710
699
711
700
[ * Gitの` status ` コマンドについてもっと詳しく* ] ( http://git-scm.com/docs/git-status )
712
701
@@ -719,7 +708,7 @@ $ git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %C
719
708
720
709
このように表示される:
721
710
722
- ![ git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative] ( http://i.imgur.com/EARRQyJ .png )
711
+ ![ git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative] ( http://i.imgur.com/58eOtkW .png )
723
712
724
713
この設定は[ Palesz] ( http://stackoverflow.com/users/88355/palesz ) が考えたものだ。
725
714
@@ -834,6 +823,7 @@ $ git config --global alias.ac 'add -A . && commit'
834
823
| ` git tags ` | ` git tag -l ` | ` git config --global alias.tags 'tag -l' ` |
835
824
| ` git branches ` | ` git branch -a ` | ` git config --global alias.branches 'branch -a' ` |
836
825
| ` git cleanup ` | `git branch --merged | grep -v '* ' | xargs git branch -d` | `git config --global alias.cleanup "!git branch --merged | grep -v '* ' | xargs git branch -d"` |
826
+ | ` git cleanup ` | `git branch --merged | grep -v '* ' | xargs git branch -d` | `git config --global alias.cleanup "!git branch --merged | grep -v '* ' | xargs git branch -d"` |
837
827
| ` git remotes ` | ` git remote -v ` | ` git config --global alias.remotes 'remote -v' ` |
838
828
| ` git lg ` | ` git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -- ` | ` git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" ` |
839
829
0 commit comments