10000 Merge pull request #133 from hail2u/ja-translation · loochao/github-cheat-sheet@84b064f · GitHub
[go: up one dir, main page]

Skip to content

Commit 84b064f

Browse files
committed
Merge pull request tiimgreen#133 from hail2u/ja-translation
Update Ja translation to 96f050f
2 parents 96f050f + 28f2447 commit 84b064f

File tree

1 file changed

+83
-3
lines changed

1 file changed

+83
-3
lines changed

README.ja.md

Lines changed: 83 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# GitHubカンニング・ペーパー
22
これはGitやGitHubの隠された機能やよく知られていない機能の一覧だ。[Zach Holman](https://github.com/holman)によるAloha Ruby Conference 2012での[Git and GitHub Secrets](https://github.com/tiimgreen/github-cheat-sheet)[スライド](https://github.com/tiimgreen/github-cheat-sheet))とWDCNZ 2013での[More Git and GitHub Secrets](https://vimeo.com/72955426)[スライド](https://speakerdeck.com/holman/more-git-and-github-secrets))の二つのトークを元にしている。
33

4+
*短縮URL: [`http://git.io/sheet`](http://git.io/sheet)*
5+
46
*Read this in other languages: [English](README.md), [한국어](README.ko.md), [日本語](README.ja.md), [简体中文](README.zh-cn.md), [正體中文](README.zh-tw.md).*
57

68
# 目次
@@ -21,6 +23,7 @@
2123
- [issueの相互リンク](#%E3%82%A4%E3%82%B7%E3%83%A5%E3%83%BC%E3%81%AE%E7%9B%B8%E4%BA%92%E3%83%AA%E3%83%B3%E3%82%AF)
2224
- [コメントのロック](#%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AE%E3%83%AD%E3%83%83%E3%82%AF)
2325
- [pull requestでのCI結果の表示](#%E3%83%97%E3%83%AB%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%81%A7%E3%81%AEci%E7%B5%90%E6%9E%9C%E3%81%AE%E8%A1%A8%E7%A4%BA)
26+
- [絞り込み検索](#%E7%B5%9E%E3%82%8A%E8%BE%BC%E3%81%BF%E6%A4%9C%E7%B4%A2)
2427
- [Markdownファイルでの構文強調](#markdown%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%A7%E3%81%AE%E6%A7%8B%E6%96%87%E5%BC%B7%E8%AA%BF)
2528
- [Emoji](#emoji)
2629
- [画像及びアニメーション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)
@@ -34,6 +37,7 @@
3437
- [GitHub Pagesでのメタデータとプラグインのサポート](#github-pages%E3%81%A7%E3%81%AE%E3%83%A1%E3%82%BF%E3%83%87%E3%83%BC%E3%82%BF%E3%81%A8%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%81%AE%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88)
3538
- [文書内のYAMLメタデータ](#%E6%96%87%E6%9B%B8%E5%86%85%E3%81%AEyaml%E3%83%A1%E3%82%BF%E3%83%87%E3%83%BC%E3%82%BF)
3639
- [表形式のデータ表示](#%E8%A1%A8%E5%BD%A2%E5%BC%8F%E3%81%AE%E3%83%87%E3%83%BC%E3%82%BF%E8%A1%A8%E7%A4%BA)
40+
- [PDF表示](#pdf%E8%A1%A8%E7%A4%BA)
3741
- [pull requestの取り消し](#pull+request%E3%81%AE%E5%8F%96%E3%82%8A%E6%B6%88%E3%81%97)
3842
- [差分の表示](#%E5%B7%AE%E5%88%86%E3%81%AE%E8%A1%A8%E7%A4%BA)
3943
- [レンダリング済みの差分](#%E3%83%AC%E3%83%B3%E3%83%80%E3%83%AA%E3%83%B3%E3%82%B0%E6%B8%88%E3%81%BF%E3%81%AE%E5%B7%AE%E5%88%86)
@@ -42,7 +46,6 @@
4246
- [pull requestの内容をDIFFまたはPATCH形式で取得](#%E3%83%97%E3%83%AB%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%81%AE%E5%86%85%E5%AE%B9%E3%82%92diff%E3%81%BE%E3%81%9F%E3%81%AFpatch%E5%BD%A2%E5%BC%8F%E3%81%A7%E5%8F%96%E5%BE%97)
4347
- [画像の表示とDIFF](#%E7%94%BB%E5%83%8F%E3%81%AE%E8%A1%A8%E7%A4%BA%E3%81%A8diff)
4448
- [Hub](#hub)
45-
- [共同開発者との摩擦の軽減](#%E5%85%B1%E5%90%8C%E9%96%8B%E7%99%BA%E8%80%85%E3%81%A8%E3%81%AE%E6%91%A9%E6%93%A6%E3%81%AE%E8%BB%BD%E6%B8%9B)
4649
- [開発参加のガイドライン](#%E9%96%8B%E7%99%BA%E5%8F%82%E5%8A%A0%E3%81%AE%E3%82%AC%E3%82%A4%E3%83%89%E3%83%A9%E3%82%A4%E3%83%B3)
4750
- [Octicons](#octicons)
4851
- [GitHub情報](#github%E6%83%85%E5%A0%B1)
@@ -51,11 +54,13 @@
5154
- [すべての削除済みファイルをワーキング・ツリーから削除する](#%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E5%89%8A%E9%99%A4%E6%B8%88%E3%81%BF%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E3%83%AF%E3%83%BC%E3%82%AD%E3%83%B3%E3%82%B0%E3%83%BB%E3%83%84%E3%83%AA%E3%83%BC%E3%81%8B%E3%82%89%E5%89%8A%E9%99%A4%E3%81%99%E3%82%8B)
5255
- [直前のブランチ](#%E7%9B%B4%E5%89%8D%E3%81%AE%E3%83%96%E3%83%A9%E3%83%B3%E3%83%81)
5356
- [空白の削除](#%E7%A9%BA%E7%99%BD%E3%81%AE%E5%89%8A%E9%99%A4)
57+
- [SSH公開鍵](#SSH%E5%85%AC%E9%96%8B%E9%8D%B5)
5458
- [pull requestのチェックアウト](#%E3%83%97%E3%83%AB%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%81%AE%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%82%A2%E3%82%A6%E3%83%88)
5559
- [空のコミット](#%E7%A9%BA%E3%81%AE%E3%82%B3%E3%83%9F%E3%83%83%E3%83%88)
5660
- [Gitステータスのスタイリング](#git%E3%82%B9%E3%83%86%E3%83%BC%E3%82%BF%E3%82%B9%E3%81%AE%E3%82%B9%E3%82%BF%E3%82%A4%E3%83%AA%E3%83%B3%E3%82%B0)
5761
- [Gitログのスタイリング](#git%E3%83%AD%E3%82%B0%E3%81%AE%E3%82%B9%E3%82%BF%E3%82%A4%E3%83%AA%E3%83%B3%E3%82%B0)
5862
- [コミットログの検索](#%E3%82%B3%E3%83%9F%E3%83%83%E3%83%88%E3%83%AD%E3%82%B0%E3%81%AE%E6%A4%9C%E7%B4%A2)
63+
- [Git Grep](#git-grep)
5964
- [マージ済みブランチ](#%E3%83%9E%E3%83%BC%E3%82%B8%E6%B8%88%E3%81%BF%E3%83%96%E3%83%A9%E3%83%B3%E3%83%81)
6065
- [FixupとAutosquash](#fixup%E3%81%A8autosquash)
6166
- [ローカル・リポジトリを参照するウェブサーバー](#%E3%83%AD%E3%83%BC%E3%82%AB%E3%83%AB%E3%83%AA%E3%83%9D%E3%82%B8%E3%83%88%E3%83%AA%E3%82%92%E5%8F%82%E7%85%A7%E3%81%99%E3%82%8B%E3%82%A6%E3%82%A7%E3%83%96%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC)
@@ -281,6 +286,35 @@ $ git commit -m "Fix screwup, fixes #12"
281286

282287
[*コミット・ステータスAPIについてもっと詳しく*](https://github.com/blog/1227-commit-status-api)
283288

289+
### 絞り込み検索
290+
issueとpull requestの検索インターフェイスでは、絞り込みをかけることが可能だ。
291+
292+
例えば[Railsのリポジトリー](https://github.com/rails/rails/issues)では、以下の様な絞り込み検索により"activerecord"というラベルがついたissueのみを表示することができる:
293+
294+
`is:issue label:activerecord`
295+
296+
逆に"activerecord"というラベルが*ついていない*issueのみを表示することもできる:
297+
298+
`is:issue -label:activerecord`
299+
300+
そして、この絞り込み検索はpull requestに対しても行うことができる:
301+
302+
`is:pr -label:activerecord`
303+
304+
GitHubでは開かれているissueやpull requestのみを表示するタブ、または既に閉じられたそれらのみを表示するタブが用意されているが、絞り込み検索によってマージ済みのpull requestのみを表示することもできる。以下のようなフィルターを使えば良いだろう:
305+
306+
`is:merged`
307+
308+
[*issueの検索についてもっと詳しく*](https://help.github.com/articles/searching-issues)
309+
310+
そしてGitHubはStatus APIの結果を使ってフィルターすることもできるようになった。
311+
312+
Status APIでsuccessが設定されたpull requestのみ:
313+
314+
`status:success`
315+
316+
[*Status APIを使った絞り込み検索についてもっと詳しく*](https://github.com/blog/2014-filter-pull-requests-by-status)
317+
284318
### Markdownファイルでの構文強調
285319
例えばMarkdownファイルでRubyのコードを構文強調したいならば以下のようにする:
286320

@@ -452,7 +486,14 @@ GitHubでは`.csv`(カンマ区切り)と`.tsv`(タブ区切り)の形
452486

453487
![Tabular data](https://camo.githubusercontent.com/1b6dd0157ffb45d9939abf14233a0cb13b3b4dfe/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3238323735392f3937363436322f33323038336463652d303638642d313165332d393262322d3566323863313061353035392e706e67)
454488

455-
[*表形式のデーター表示についてもっと詳しく*](https://github.com/blog/1601-see-your-csvs)
489+
[*表形式のデータ表示についてもっと詳しく*](https://github.com/blog/1601-see-your-csvs)
490+
491+
### PDF表示
492+
GitHubではPDFの表示をサポートしている:
493+
494+
![PDF](https://cloud.githubusercontent.com/assets/1000669/7492902/f8493160-f42e-11e4-8cea-1cb4f02757e7.png)
495+
496+
[*PDF表示についてもっと詳しく*](https://github.com/blog/1974-pdf-viewing)
456497

457498
### pull requestの取り消し
458499
pull requestをマージした後、意味がなかったことがわかったり、そのpull requestをマージしたのは間違いだったことがわかることもあるだろう。
@@ -591,7 +632,7 @@ On branch master
591632
Changes not staged for commit:
592633
deleted: a
593634
deleted: c
594-
635+
595636
$ git rm $(git ls-files -d)
596637
rm 'a'
597638
rm 'c'
@@ -634,6 +675,17 @@ $ git stripspace < README.md
634675

635676
[*Gitの`stripspace`コマンドについてもっと詳しく*](http://git-scm.com/docs/git-stripspace)
636677

678+
### SSH公開鍵
679+
以下のURLにアクセスすることで、SSH公開鍵の一覧をテキスト形式で取得することができる:
680+
681+
```
682+
https://github.com/{user}.keys
683+
```
684+
685+
例: [https://github.com/tiimgreen.keys](https://github.com/tiimgreen.keys)
686+
687+
[*SSH公開鍵についてもっと詳しく*](https://changelog.com/github-exposes-public-ssh-keys-for-its-users/)
688+
637689
### pull requestのチェックアウト
638690
pull requestはGitHubのリポジトリでは特別なブランチであり、様々な方法でローカルに取り込むことができる:
639691

@@ -760,6 +812,34 @@ $ git show :/typo
760812

761813
注: 終了するには`q`を押す。
762814

815+
### Git Grep
816+
Git Grepは指定したパターンに一致する行の一覧を返してくれる。
817+
818+
実行すると:
819+
820+
```bash
821+
$ git grep aliases
822+
```
823+
824+
*aliases*という文字を含むファイルを全て表示することだろう。
825+
826+
![git grep aliases](http://i.imgur.com/DL2zpQ9.png)
827+
828+
注: 終了するには`q`を押す。
829+
830+
複数のフラグを組み合わせることで、より高度な検索を行うことができる。例えば:
831+
832+
* `-e` 次のパラメーターをパターンとする (例: regex)
833+
* `--and``--or``--not` 複数のパターンを組み合わせる
834+
835+
以下のようにして使う:
836+
837+
```bash
838+
$ git grep -e pattern --and -e anotherpattern
839+
```
840+
841+
[*Gitの`grep`コマンドについてもっと詳しく*](http://git-scm.com/docs/git-grep)
842+
763843
### マージ済みブランチ
764844
以下のように実行すると:
765845

0 commit comments

Comments
 (0)
0