|
48 | 48 | - [GitHub情報](#github%E6%83%85%E5%A0%B1)
|
49 | 49 | - [GitHub Talks](#github-talks)
|
50 | 50 | - [Git](#git)
|
| 51 | + - [すべての削除済みファイルをワーキング・ツリーから削除する](#%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) |
51 | 52 | - [直前のブランチ](#%E7%9B%B4%E5%89%8D%E3%81%AE%E3%83%96%E3%83%A9%E3%83%B3%E3%83%81)
|
52 | 53 | - [空白の削除](#%E7%A9%BA%E7%99%BD%E3%81%AE%E5%89%8A%E9%99%A4)
|
53 | 54 | - [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)
|
54 |
| - - [空のコミット :trollface:](#%E7%A9%BA%E3%81%AE%E3%82%B3%E3%83%9F%E3%83%83%E3%83%88-trollface) |
| 55 | + - [空のコミット](#%E7%A9%BA%E3%81%AE%E3%82%B3%E3%83%9F%E3%83%83%E3%83%88) |
55 | 56 | - [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)
|
56 | 57 | - [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)
|
57 | 58 | - [コミットログの検索](#%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)
|
@@ -304,7 +305,7 @@ GitHubでは[Linguist](https://github.com/github/linguist)を使って言語を
|
304 | 305 | [*GitHub Flavored Markdownについてもっと詳しく*](https://help.github.com/articles/github-flavored-markdown)
|
305 | 306 |
|
306 | 307 | ### Emoji
|
307 |
| -Emojiはpull requestやissue、READMEなどで`:name_of_emoji:`と書くと利用できる: |
| 308 | +Emojiはpull requestやissue、コミット・メッセージ、リポジトリーの概要などで`:name_of_emoji:`と書くと利用できる: |
308 | 309 |
|
309 | 310 | 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)で確認できる。
|
310 | 311 |
|
@@ -575,6 +576,33 @@ GitHubで使われているアイコン(Octicons)はオープンソース化
|
575 | 576 | | More Git and GitHub Secrets | https://www.youtube.com/watch?v=p50xsL-iVgU |
|
576 | 577 |
|
577 | 578 | ## Git
|
| 579 | +### すべての削除済みファイルをワーキング・ツリーから削除する |
| 580 | +例えば`/bin/rm`を使って大量のファイルを削除した場合、以下のコマンドを使えばワーキング・ツリー、そしてインデックスからも削除することができ、ファイルごとにそれぞれGitコマンドを実行する必要がなくなる: |
| 581 | + |
| 582 | +```bash |
| 583 | +$ git rm $(git ls-files -d) |
| 584 | +``` |
| 585 | + |
| 586 | +例えば以下のように実行される: |
| 587 | + |
| 588 | +```bash |
| 589 | +$ git status |
| 590 | +On branch master |
| 591 | +Changes not staged for commit: |
| 592 | + deleted: a |
| 593 | + deleted: c |
| 594 | + |
| 595 | +$ git rm $(git ls-files -d) |
| 596 | +rm 'a' |
| 597 | +rm 'c' |
| 598 | + |
| 599 | +$ git status |
| 600 | +On branch master |
| 601 | +Changes to be committed: |
| 602 | + deleted: a |
| 603 | + deleted: c |
| 604 | +``` |
| 605 | + |
578 | 606 | ### 直前のブランチ
|
579 | 607 | Gitで直前のブランチへ移動するには:
|
580 | 608 |
|
@@ -660,7 +688,7 @@ git checkout pr/42
|
660 | 688 |
|
661 | 689 | [*pull requestのチェックアウトについてもっと詳しく*](https://help.github.com/articles/checking-out-pull-requests-locally)
|
662 | 690 |
|
663 |
| -### 空のコミット :trollface: |
| 691 | +### 空のコミット |
664 | 692 | `--allow-empty`オプションを付けると、コードの変化がなくてもコミットを作成することができる:
|
665 | 693 |
|
666 | 694 | ```bash
|
@@ -877,6 +905,7 @@ $ git config --global color.ui 1
|
877 | 905 | | Git for Computer Scientists | http://eagain.net/articles/git-for-computer-scientists/ |
|
878 | 906 | | Git Magic | http://www-cs-students.stanford.edu/~blynn/gitmagic/ |
|
879 | 907 | | GitHub Training Kit | http://training.github.com/kit |
|
| 908 | +| Git Visualization Playground | http://onlywei.github.io/explain-git-with-d3/#freeplay | |
880 | 909 |
|
881 | 910 | #### Git Books
|
882 | 911 | | Title | Link |
|
|
0 commit comments