1
0
mirror of https://github.com/tiimgreen/github-cheat-sheet.git synced 2025-08-08 08:56:35 +02:00
This commit is contained in:
Tim Green
2016-01-03 16:01:50 +00:00

View File

@@ -1,6 +1,6 @@
# GitHub 치트 시트 [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)
Git과 GitHub에서 꽤 유용하지만 숨겨져 있는 기능들에 대해 다룹니다. 이 치트 시트는 [Zach Holman](https://github.com/holman)이 Aloha Ruby Conference 2012에서 발표한 [Git과 GitHub의 비밀들](http://www.confreaks.com/videos/1229-aloharuby2012-git-and-github-secrets)([슬라이드](https://speakerdeck.com/holman/git-and-github-secrets)) WDCNZ 2013에서 발표한 [Git과 GitHub에 대한 더 많은 비밀들](https://vimeo.com/72955426)([슬라이드](https://speakerdeck.com/holman/more-git-and-github-secrets))에서 영감을 받아 작성되었습니다.
Git과 GitHub에서 꽤 유용하지만 숨겨져 있는 기능들에 대해 다룹니다. 이 치트 시트는 [Zach Holman](https://github.com/holman)이 Aloha Ruby Conference 2012에서 발표한 [Git과 GitHub의 비밀들](http://www.confreaks.com/videos/1229-aloharuby2012-git-and-github-secrets)([슬라이드](https://speakerdeck.com/holman/git-and-github-secrets)) WDCNZ 2013에서 발표한 [Git과 GitHub에 대한 더 많은 비밀들](https://vimeo.com/72955426)([슬라이드](https://speakerdeck.com/holman/more-git-and-github-secrets))에서 영감을 받아 작성되었습니다.
*단축주소: [`http://git.io/sheet`](http://git.io/sheet)*
@@ -85,14 +85,14 @@ Git과 GitHub에서 꽤 유용하지만 숨겨져 있는 기능들에 대해 다
### Adjust Tab Space
diff나 파일 URL에 `?ts=4`를 덧붙이면 문자의 크기를 기본값인 8대신 4공백으로 보여줍니다. `ts`뒤의 숫자는 설정에 맞게 변경 하실 수 있습니다. gist나 raw파일 보기에는 적용 되지 않습니다만, [크롬 익스텐션](https://chrome.google.com/webstore/detail/github-tab-size/ofjbgncegkdemndciafljngjbdpfmbkn)이나 [오페라 익스텐션](https://addons.opera.com/en/extensions/details/github-tab-size/)으로 자동화 할 수 있습니다.
diff나 파일 URL에 `?ts=4`를 덧붙이면 문자의 크기를 기본값인 공백 8개 대신 4로 보여줍니다. `ts` 뒤의 숫자는 설정에 맞게 변경 하실 수 있습니다. gist나 raw 파일 보기에는 적용 되지 않습니다만, [크롬 확장 프로그램](https://chrome.google.com/webstore/detail/github-tab-size/ofjbgncegkdemndciafljngjbdpfmbkn)이나 [오페라 확장 프로그램](https://addons.opera.com/en/extensions/details/github-tab-size/)으로 자동화 할 수 있습니다.
여기에 있는 Go 소스 파일은 `?ts=4`를 붙이기 전에는 이렇습니다.
![Before, tab space example](http://i.imgur.com/GIT1Fr0.png)
그리고 `?ts=4`를 붙인 다음에는 이렇게 됩니다.
--allow-empty
![After, tab space example](http://i.imgur.com/70FL4H9.png)
### Commit History by Author
@@ -115,9 +115,10 @@ https://github.com/rails/rails/commits/master?author=dhh
$ git clone https://github.com/tiimgreen/github-cheat-sheet
```
[* `clone` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-clone)
[*Git `clone` 명령에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-clone)
### Branch
#### Compare all Branches to Another Branch
저장소의 [브랜치](https://github.com/tiimgreen/github-cheat-sheet/branches) 페이지는, 커밋 버튼의 뒤에 있습니다.
@@ -128,7 +129,7 @@ https://github.com/{user}/{repo}/branches
... 메인 브랜치에 머지되지 않은 모든 브랜치의 리스트를 볼 수 있습니다.
여기에서 버튼 클릭으로 비교 페이지나 브랜치 삭제를 하실 수 있습니다.
여기에서 버튼 클릭으로 비교 페이지에 접속하거나 브랜치 삭제 수 있습니다.
![Compare branches not merged into master in rails/rails repo - https://github.com/rails/rails/branches](http://i.imgur.com/0FEe30z.png)
@@ -140,7 +141,7 @@ GitHub에서 브랜치 비교를 하시려면, URL을 이런 식으로 바꾸세
https://github.com/{user}/{repo}/compare/{range}
```
`{range}``master...4-1-stable`식으로 적습니다.
`{range}``master...4-1-stable`과 같이 적습니다.
예를 들어
@@ -188,13 +189,13 @@ https://github.com/rails/rails/compare/byroot:idempotent-counter-caches...master
### Gists
[Gists](https://gist.github.com/)는 본격적인 저장소를 만들지 않고, 작은 코드 조각과 일할 수 있는 쉬운 방법입니다.
[Gist](https://gist.github.com/)는 본격적인 저장소를 만들지 않고, 작은 코드 조각과 일할 수 있는 쉬운 방법입니다.
![Gist](http://i.imgur.com/VkKI1LC.png?1)
[이렇게](https://gist.github.com/tiimgreen/10545817.pibb) Gist URL뒤에 `.pibb`를 넣으면 다른 사이트에 넣을수 있는 *HTML 온리* 버전을 만들 수 있습니다.
[이렇게](https://gist.github.com/tiimgreen/10545817.pibb) Gist URL 뒤에 `.pibb`를 넣으면 다른 사이트에 첨부할 수 있는 *HTML 온리* 버전을 만들 수 있습니다.
Gists는 저장소처럼 취급할 수 있고 클론도 됩니다.
Gist는 저장소처럼 취급할 수 있고 클론도 됩니다.
```bash
$ git clone https://gist.github.com/tiimgreen/10545817
@@ -202,15 +203,16 @@ $ git clone https://gist.github.com/tiimgreen/10545817
![Gists](http://i.imgur.com/BcFzabp.png)
이는 Gists에서도 수정하고 업데이트를 푸할 수 있다는 의미입니다.
이는 Gists에서도 수정하고 업데이트를 푸할 수 있다는 의미입니다.
```bash
$ git commit
$ git push
Username for 'https://gist.github.com':
Password for 'https://tiimgreen@gist.github.com':
```
하지만, Gists는 디랙토리를 지원하지 않습니다. 모든 파일은 저장소의 루트에 넣을 필요가 있습니다.
하지만, Gists는 디렉터리를 지원하지 않습니다. 모든 파일은 저장소의 루트에 넣을 필요가 있습니다.
[*Gist를 만드는 법에 대해 더 읽어보세요.*](https://help.github.com/articles/creating-gists)
### Git.io
@@ -219,7 +221,7 @@ Password for 'https://tiimgreen@gist.github.com':
![Git.io](http://i.imgur.com/6JUfbcG.png?1)
순수 HTTP에서 Curl으로 사용하실 수도 있습니다.
Curl으로 순수 HTTP를 통해 사용하실 수도 있습니다.
```bash
$ curl -i http://git.io -F "url=https://github.com/..."
@@ -238,9 +240,9 @@ Location: https://github.com/...
저장소 페이지에서 단축키를 사용하면 쉽게 이동할 수 있습니다.
- `t`를 누르면 파일 탐색 페이지로 이동합니다.
- `w`를 누르면 브치 선택 페이지로 이동합니다.
- `s`를 누르면 지금 저장소의 검색창 포커스니다. 백스페이스를 누르면 채워져 있는 "This repository"를 지워 GitHub전체에서 검색할 수 있게 됩니다.
- `l` 누르면 있는 이슈의 라벨을 수정할 수 있습니다.
- `w`를 누르면 브치 선택 페이지로 이동합니다.
- `s`를 누르면 현재 저장소의 검색창으로 포커스가 이동합니다. 백스페이스를 누르면 채워져 있는 "This repository"를 지워 GitHub 전체에서 검색할 수 있게 됩니다.
- `l` 누르면 이슈의 라벨을 수정할 수 있습니다.
- __파일을 보고 있을 때__ (예를 들어 `https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.md`) `y`를 누르면 URL을 지금 보고 있는 페이지를 사실상 고정하도록 합니다. 코드가 바뀐다고 해도 이번에 본 내용을 다시 볼 수 있습니다.
지금 페이지에서 쓸 수 있는 모든 단축키를 보시려면 `?`를 누르세요.
@@ -269,11 +271,11 @@ https://github.com/rails/rails/blob/master/activemodel/lib/active_model.rb#L53-L
$ git commit -m "Fix screwup, fixes #12"
```
이렇게 하면 이슈를 닫고 클로징 커맨트로 참조하게 합니다.
이렇게 하면 이슈를 닫고 클로징 커밋으로 참조하게 합니다.
![Closing Repo](http://i.imgur.com/Uh1gZdx.png)
[*커밋 메지로 이슈 닫기에 대해 더 읽어 보세요.*](https://help.github.com/articles/closing-issues-via-commit-messages)
[*커밋 메지로 이슈 닫기에 대해 더 읽어 보세요.*](https://help.github.com/articles/closing-issues-via-commit-messages)
### Cross-Link Issues
@@ -285,11 +287,11 @@ $ git commit -m "Fix screwup, fixes #12"
### Locking Conversations
풀 리퀘스트와 이슈는 레포지터리의 주인이나 협업자에 의해 잠글 수 있습니다.
풀 리퀘스트와 이슈는 저장소의 주인이나 협업자 잠글 수 있습니다.
![Lock conversation](https://cloud.githubusercontent.com/assets/2723/3221693/bf54dd44-f00d-11e3-8eb6-bb51e825bc2c.png)
이는 프로젝트의 협업자가 아닌 사람은 더 이상 커맨트를 달 수 없게된다는 말입니다.
이는 프로젝트의 협업자가 아닌 사람은 더 이상 댓글을 달 수 없게 된다는 말입니다.
![Comments locked](https://cloud.githubusercontent.com/assets/2723/3221775/d6e513b0-f00e-11e3-9721-2131cb37c906.png)
@@ -307,8 +309,8 @@ $ git commit -m "Fix screwup, fixes #12"
이슈, 풀 리퀘스트 둘 다 유저 인터페이스에서 필터링이 가능합니다.
레일 저장소 <https://github.com/rails/rails/issues> 에서, 다음 필터는
"activerecord" 라벨을 선택하여 만들어 집니다.
레일 저장소 <https://github.com/rails/rails/issues>에서, "activerecord" 라벨을
선택하여 다음 필터를 만들 수 있습니다.
`is:issue label:activerecord`
@@ -355,13 +357,13 @@ table.add_row('Tim Green', 'tiimgreen@gmail.com')
puts table.to_s
```
GitHub는 [Linguist](https://github.com/github/linguist)를 사용해 언어를 감지하고 신스를 하이라이트합니다. [언어 YAML 파일](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)을 정독하시면 어떤 키워드가 유효한지 확인하실 수 있습니다.
GitHub는 [Linguist](https://github.com/github/linguist)를 사용해 언어를 감지하고 신스를 하이라이트합니다. [언어 YAML 파일](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)을 정독하시면 어떤 키워드가 유효한지 확인하실 수 있습니다.
[*GitHub Flavored 마크다운에 대해 더 읽어 보세요.*](https://help.github.com/articles/github-flavored-markdown)
### Emojis
에모지는 풀 리퀘스트, 이슈, 커밋 메지, 저장소 설명등에 `:에모지의_이름:`으로 넣을 수 있습니다.
에모지는 풀 리퀘스트, 이슈, 커밋 메지, 저장소 설명 등에 `:에모지의_이름:`으로 넣을 수 있습니다.
GitHub에서 사용 가능한 에모지의 전 목록은 [emoji-cheat-sheet.com](http://www.emoji-cheat-sheet.com/)나 [scotch-io/All-GitHub-Emoji-Icons](https://github.com/scotch-io/All-GitHub-Emoji-Icons)에서 확인하실 수 있습니다.
편리한 에모지 검색 엔진은 [emoji.muan.co](http://emoji.muan.co/)에 있습니다.
@@ -376,7 +378,7 @@ GitHub에서 많이 사용하는 에모지 탑 5위는 이렇습니다.
### Images/GIFs
커맨트나 README등에 이미지와 GIF를 넣을 수 있습니다.
댓글이나 README 등에 이미지와 GIF를 넣을 수 있습니다.
```
![Alt Text](http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif)
@@ -390,7 +392,7 @@ GitHub에서 많이 사용하는 에모지 탑 5위는 이렇습니다.
![Peter don't care](http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif)
모든 이미지는 GitHub에서 케쉬합니다. 그래서 호스트가 죽어도 이미지는 여전히 남습니다.
모든 이미지는 GitHub에서 캐시합니다. 그래서 호스트가 죽어도 이미지는 여전히 남습니다.
#### Embedding Images in GitHub Wiki
@@ -406,7 +408,7 @@ GitHub에서 많이 사용하는 에모지 탑 5위는 이렇습니다.
### Quick Quoting
스레드에 답글 때 전에 누가 말한 어떤 내용을 인용하고 싶다면, 텍스트를 하이라이트하고 `r`을 누르세요. 이렇게 하면 내용을 텍스트 박스에 인용 포맷으로 복사해 줍니다.
스레드에 답글을 달 때 전에 누가 말한 어떤 내용을 인용하고 싶다면, 텍스트를 하이라이트하고 `r`을 누르세요. 이렇게 하면 내용을 텍스트 박스에 인용 포맷으로 복사해 줍니다.
![Quick Quote](https://f.cloud.github.com/assets/296432/124483/b0fa6204-6ef0-11e2-83c3-256c37fa7abc.gif)
@@ -416,7 +418,7 @@ GitHub에서 많이 사용하는 에모지 탑 5위는 이렇습니다.
_(크롬에서만 동작합니다)_
스크린샷을 찍고 클립보드에 있는 경우 (mac: `cmd-ctrl-shift-4`), 간단히 이미지를 커맨트 색션에 붙여넣(`cmd-v / ctrl-v`) 수 있고 이는 자동으로 GitHub에 업로드 됩니다.
스크린샷을 찍고 클립보드에 복사한 경우 (mac: `cmd-ctrl-shift-4`), 간단히 이미지를 댓글 영역에 붙여넣(`cmd-v / ctrl-v`) 수 있고 이는 자동으로 GitHub에 업로드 됩니다.
![Pasting Clipboard Image to Comments](https://cloud.githubusercontent.com/assets/39191/5794265/39c9b65a-9f1b-11e4-9bc7-04e41f59ea5f.png)
@@ -439,7 +441,7 @@ _(크롬에서만 동작합니다)_
### Task Lists
이슈와 풀 리퀘스트에서 의 문법으로 체크박스를 넣을 수 있습니다.(스페이스에 주의하세요.)
이슈와 풀 리퀘스트에서 아래의 문법으로 체크박스를 넣을 수 있습니다.(스페이스에 주의하세요.)
```
- [ ] Be awesome
@@ -452,7 +454,7 @@ _(크롬에서만 동작합니다)_
![Task List](http://i.imgur.com/jJBXhsY.png)
체크박스 클릭면, 순수 마크다운에서 갱신이 이루어집니다.
체크박스 클릭면, 순수 마크다운에서 갱신이 이루어집니다.
```
- [x] Be awesome
@@ -463,38 +465,42 @@ _(크롬에서만 동작합니다)_
- [ ] Sleep
```
[*테스크 리스트에 대해 더 읽어 보세요.*](https://help.github.com/articles/writing-on-github#task-lists)
[*할 일 목록에 대해 더 읽어 보세요.*](https://help.github.com/articles/writing-on-github#task-lists)
#### Task Lists in Markdown Documents
이제 마크다운 문서에서 **읽기 전용** 체크리스트를 넣을 수 있습니다.
```
- [ ] Mercury
- [x] Venus
- [x] Earth
- [x] Moon
- [x] Mars
- [ ] Jupiter
- [ ] Deimos
- [ ] Phobos
```
- [ ] Mercury
- [x] Venus
- [x] Earth
- [x] Moon
- [x] Mars
- [ ] Jupiter
- [ ] Deimos
- [ ] Phobos
[*마크다운 문서에서의 테스크 리스트에 대해 더 읽어 보세요.*](https://github.com/blog/1825-task-lists-in-all-markdown-documents)
[*마크다운 문서에서의 할 일 목록에 대해 더 읽어 보세요.*](https://github.com/blog/1825-task-lists-in-all-markdown-documents)
### Relative Links
상대 경로 링크는 마크다운 파일이 내부 텐츠로 링크될 때 추천합니다.
상대 경로 링크는 마크다운 파일이 내부 텐츠로 링크될 때 추천합니다.
```markdown
[Link to a header](#awesome-section)
[Link to a file](docs/readme)
```
절대 경로 링크는 URL이 변경 될 때 마다 변경해야 합니다. (예를 들어 저장소 이름 변경, 유저이름 변경, 프로젝트 포크)
절대 경로 링크는 URL이 변경 될 때마다 변경해야 합니다. (예를 들어 저장소 이름 변경, 아이디 변경, 프로젝트 포크)
상대 경로 링크를 사용하면 문서를 쉽게 스스로 독립적으로 만들 수 있습니다.
[*상대 경로 링크에 대해 더 읽어 보세요.*](https://help.github.com/articles/relative-links-in-readmes)
@@ -503,9 +509,9 @@ _(크롬에서만 동작합니다)_
지킬로 작성된 페이지와 포스트에서, 저장소 정보는 예를 들어 `{{ site.github.project_title }}`처럼 `site.github` 이름 공간으로 사용하고 표시할 수 있습니다.
Jemoji와 jekyll-mentions플러그인은 GitHub.com에서 처럼 [emoji](#emojis)와 [@mentions](https://github.com/blog/821) 지킬 포스트와 페이지에서 사용하게 합니다.
Jemoji와 jekyll-mentions 플러그인은 GitHub.com에서처럼 [emoji](#emojis)와 [@mentions](https://github.com/blog/821) 지킬 포스트와 페이지에서 사용하게 합니다.
[*저장소 메타 데이와 GitHub 페이지의 플러그인 지원에 대해 더 읽어 보세요.*](https://github.com/blog/1797-repository-metadata-and-plugin-support-for-github-pages)
[*저장소 메타 데이와 GitHub 페이지의 플러그인 지원에 대해 더 읽어 보세요.*](https://github.com/blog/1797-repository-metadata-and-plugin-support-for-github-pages)
### Viewing YAML Metadata in your Documents
@@ -521,11 +527,11 @@ GitHub는 `.csv` (comma-separated) 와 `.tsv` (tab-separated)파일에 대해
![Tabular data](https://camo.githubusercontent.com/1b6dd0157ffb45d9939abf14233a0cb13b3b4dfe/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3238323735392f3937363436322f33323038336463652d303638642d313165332d393262322d3566323863313061353035392e706e67)
[*표 데이 표시에 대해 더 읽어 보세요.*](https://github.com/blog/1601-see-your-csvs)
[*표 데이 표시에 대해 더 읽어 보세요.*](https://github.com/blog/1601-see-your-csvs)
### Rendering PDF
GitHub에서 PDF를 렌더할 수 있습니다.
GitHub에서 PDF를 렌더할 수 있습니다.
![PDF](https://cloud.githubusercontent.com/assets/1000669/7492902/f8493160-f42e-11e4-8cea-1cb4f02757e7.png)
@@ -543,6 +549,7 @@ GitHub에서 PDF를 렌더링할 수 있습니다.
[*풀 리퀘스트 되돌리기에 대해 더 읽어 보세요.*](https://github.com/blog/1857-introducing-the-revert-button)
### Diffs
#### Rendered Prose Diffs
GitHub에서 지원하는 산문(prose) 파일(예를 들어 Markdown)이 있는 커밋과 풀 리퀘스트에서는 *source*와 *rendered* 뷰 기능을 사용할 수 있습니다.
@@ -557,7 +564,7 @@ GitHub에서 지원하는 산문(prose) 파일(예를 들어 Markdown)이 있는
#### Diffable Maps
지오데이가 포함된 커밋이나 풀 리퀘스트를 볼 때마다 GitHub는 무엇이 변경 되었는지 시각적으로 보여줍니다.
지오데이가 포함된 커밋이나 풀 리퀘스트를 볼 때마다 GitHub는 무엇이 변경 되었는지 시각적으로 보여줍니다.
[![Diffable Maps](https://f.cloud.github.com/assets/282759/2090660/63f2e45a-8e97-11e3-9d8b-d4c8078b004e.gif)](https://github.com/benbalter/congressional-districts/commit/2233c76ca5bb059582d796f053775d8859198ec5)
@@ -565,7 +572,7 @@ GitHub에서 지원하는 산문(prose) 파일(예를 들어 Markdown)이 있는
#### Expanding Context in Diffs
diff의 닫아둔 곳의 *펼침* 버튼을 클릭하면, 문맥을 더 볼 수 있습니다. 전 파일을 표시할때까지 계속 *펼칠* 수 있으며, GitHub에서 diff가 표시되는 장소라면 어디서든 사용가능합니다.
diff의 닫아둔 곳의 *펼침* 버튼을 클릭하면, 문맥을 더 볼 수 있습니다. 전 파일을 표시할 때까지 계속 *펼칠* 수 있으며, GitHub에서 diff가 표시되는 장소라면 어디서든 사용가능합니다.
![Expanding Context in Diffs](https://f.cloud.github.com/assets/22635/1610539/863c1f64-5584-11e3-82bf-151b406a272f.gif)
@@ -692,13 +699,7 @@ Changes to be committed:
### Previous Branch
커맨드 라인에서 이전 디렉터리로 이동하려면 이렇게 합니다.
```bash
$ cd -
```
비슷하게, 깃에서 마지막 브랜치로 돌아가는 건 이렇게 할 수 있습니다.
Git에서 이전 브랜치로 돌아가는 건 이렇게 할 수 있습니다.
```bash
$ git checkout -
@@ -711,11 +712,11 @@ $ git checkout -
# Switched to branch 'master'
```
[* 브랜치에 대해 더 읽어 보세요.*](http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging)
[*Git 브랜치에 대해 더 읽어 보세요.*](http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging)
### Stripspace
Stripspace는 이런 일을 합니다.
Git Stripspace는 이런 일을 합니다.
- 줄 끝의 공백을 제거
- 빈줄을 줄임
@@ -727,17 +728,17 @@ $ git checkout -
$ git stripspace < README.md
```
[* `stripspace` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-stripspace)
[*Git `stripspace` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-stripspace)
### SSH keys
밑의 주소를 방문하면 공개 ssh 키의 목록을 일반 텍스트 형식으로 볼 수 있습니다.
아래 주소를 방문하면 공개 ssh 키의 목록을 일반 텍스트 형식으로 볼 수 있습니다.
```
https://github.com/{user}.keys
```
e.g. [https://github.com/tiimgreen.keys](https://github.com/tiimgreen.keys)
예: [https://github.com/tiimgreen.keys](https://github.com/tiimgreen.keys)
[*공개 ssh 키 접근에 대해 더 읽어 보세요.*](https://changelog.com/github-exposes-public-ssh-keys-for-its-users/)
@@ -826,15 +827,17 @@ $ git status
![git status](http://i.imgur.com/qjPyvXb.png)
이렇게 바뀝니다.
`-sb`를 추가하면
```bash
$ git status -sb
```
이렇게 바뀝니다.
![git status -sb](http://i.imgur.com/K0OY3nm.png)
[* `status` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-status)
[*Git `status` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-status)
### Styled Git Log
@@ -850,13 +853,13 @@ $ git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %C
[Palesz](http://stackoverflow.com/users/88355/palesz) 님 고맙습니다.
NOTE: 이 명령을 알리아스 (단축 명령)로 넣을 수 있습니다. [여기](#aliases)의 소개를 보세요.
NOTE: 이 명령을 알리아스(단축 명령)로 넣을 수 있습니다. [여기](#aliases)의 소개를 보세요.
[* `log` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-log)
[*Git `log` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-log)
### Git Query
쿼리는 모든 이전 커밋 메시지에서 검색해 가장 최근의 쿼리에 맞는 커밋을 찾아줍니다.
Git 쿼리는 모든 이전 커밋 메시지에서 검색해 가장 최근의 쿼리에 맞는 커밋을 찾아줍니다.
```bash
$ git show :/query
@@ -870,23 +873,25 @@ $ git show :/typo
![git show :/query](http://i.imgur.com/icaGiNt.png)
NOTE: 나오려면 `q`를 누르세요.
*나오려면 `q`를 누르세요.*
### Git Grep
Git Grep은 패턴에 매치하는 줄의 목록을 반환합니다.
Git Grep은 패턴과 일치하는 줄의 목록을 반환합니다.
다음 명령을 실행해 보세요.
```bash
$ git grep aliases
```
*aliases* 문자열이 포함된 모든 파일을 보여줍니다.
![git grep aliases](http://i.imgur.com/DL2zpQ9.png)
*나오려면 `q`를 누르세요.*
여러 플그를 이용해서 좀 더 복잡한 검색을 할 수 있습니다. 예를 들면,
여러 플그를 이용해서 좀 더 복잡한 검색을 할 수 있습니다. 예를 들면,
* `-e` 다음 파라미터는 패턴 (e.g. regex)
* `--and`, `--or`, `--not`으로 여러 패턴을 조합
@@ -896,7 +901,7 @@ $ git grep aliases
$ git grep -e pattern --and -e anotherpattern
```
[* `grep` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-grep)
[*Git `grep` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-grep)
### Merged Branches
@@ -914,7 +919,7 @@ $ git branch --no-merged
이 명령어는 현재 브랜치에 머지되지 않은 브랜치의 목록을 보여줍니다.
[* `branch` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-branch)
[*Git `branch` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-branch)
### Fixup and Autosquash
@@ -930,7 +935,7 @@ $ git rebase abcde^ --autosquash -i
### Web Server for Browsing Local Repositories
`instaweb` 커맨드을 사용하면, 즉석에서 `gitweb`안에서 작업중인 저장소를 둘러 볼
Git `instaweb` 커맨드을 사용하면, 즉석에서 `gitweb` 안에서 작업중인 저장소를 둘러 볼
수 있습니다. 이 커맨드는 `gitweb`과 로컬 저장소를 브라우징 하기 위한 웹 서버를 설정하는 스크립트입니다.
```bash
@@ -941,7 +946,7 @@ Opens:
![Git instaweb](http://i.imgur.com/Dxekmqc.png)
[* `instaweb` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-instaweb)
[*Git `instaweb` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-instaweb)
### Git Configurations
@@ -949,9 +954,9 @@ Opens:
#### Aliases
알리아스는 커스텀 명령어를 등록할 수 있는 퍼입니다. 예를 들어 `git a`로 `git add --all`를 실행하게 할 수 있습니다.
알리아스는 커스텀 Git 명령어를 등록할 수 있는 퍼입니다. 예를 들어 `git a`로 `git add --all`를 실행하게 할 수 있습니다.
알리아스를 추가하려면 `~/.gitconfig`를 찾아 다음 포으로 입력하거나
알리아스를 추가하려면 `~/.gitconfig`를 찾아 다음 포으로 입력하거나
```
[alias]
@@ -976,13 +981,13 @@ $ git config --global alias.new_alias git_function
$ git config --global alias.cm commit
```
NOTE: 여러 함수를 알리아스하려면 따옴표를 이용하세요.
여러 함수를 알리아스하려면 따옴표를 이용하세요.
```bash
$ git config --global alias.ac 'add -A . && commit'
```
여기 몇 가지 권장 알리아스가 있습니다.
여기 몇 가지 유용한 알리아스가 있습니다.
| Alias | Current Command | What to Type |
| --- | --- | --- |
@@ -1033,7 +1038,7 @@ $ git comit -m "Message"
$ git config --global color.ui 1
```
[* `config` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-config)
[*Git `config` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-config)
### Git Resources
@@ -1047,11 +1052,12 @@ $ git config --global color.ui 1
| Everyday Git | http://git-scm.com/docs/everyday |
| Git Immersion | http://gitimmersion.com/ |
| Ry's Git Tutorial | http://rypress.com/tutorials/git/index.html |
| Git for Designers | http://hoth.entp.com/output/git_for_designers.html |
| Git for Computer Scientists | http://eagain.net/articles/git-for-computer-scientists/ |
| Git Magic | http://www-cs-students.stanford.edu/~blynn/gitmagic/ |
| GitHub Training Kit | http://training.github.com/kit |
| GitHub Training Kit | https://training.github.com/kit/ |
| Git Visualization Playground | http://onlywei.github.io/explain-git-with-d3/#freeplay |
| Learn Git Branching | http://pcottle.github.io/learnGitBranching/ |
| A collection of useful .gitignore templates | https://github.com/github/gitignore |
#### Git Books
@@ -1064,3 +1070,17 @@ $ git config --global color.ui 1
| Version Control with Git | http://www.amazon.com/Version-Control-Git-collaborative-development/dp/1449316387 |
| Pragmatic Guide to Git | http://www.pragprog.com/titles/pg_git/pragmatic-guide-to-git |
| Git: Version Control for Everyone | http://www.packtpub.com/git-version-control-for-everyone/book |
#### Git Videos
| Title | Link |
| ----- | ---- |
| Linus Torvalds on Git | https://www.youtube.com/watch?v=4XpnKHJAok8 |
| Introduction to Git with Scott Chacon | https://www.youtube.com/watch?v=ZDR433b0HJY |
| Git From the Bits Up | https://www.youtube.com/watch?v=MYP56QJpDr4 |
| Graphs, Hashes, and Compression, Oh My! | https://www.youtube.com/watch?v=ig5E8CcdM9g |
| GitHub Training & Guides | https://www.youtube.com/watch?list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-&v=FyfwLX4HAxM |
#### Git Articles
| Title | Link |
| ----- | ---- |
| GitHub Flow | http://scottchacon.com/2011/08/31/github-flow.html |