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
###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`과 같이 적습니다.
예를 들어
@@ -150,18 +151,18 @@ https://github.com/rails/rails/compare/master...4-1-stable
![Rails branch compare example](http://i.imgur.com/tIRCOsK.png)
`{range}` 는 이렇게 적을 수도 있습니다.
`{range}`는 이렇게 적을 수도 있습니다.
```
https://github.com/rails/rails/compare/master@{1.day.ago}...master
https://github.com/rails/rails/compare/master@{2014-10-04}...master
```
*날짜는 `YYYY-MM-DD`형식으로 적습니다*
*날짜는 `YYYY-MM-DD` 형식으로 적습니다*
![Another compare example](http://i.imgur.com/5dtzESz.png)
브랜치는 `diff``patch`뷰로도 확인할 수 있습니다.
브랜치는 `diff``patch` 뷰로도 확인할 수 있습니다.
```
https://github.com/rails/rails/compare/master...4-1-stable.diff
@@ -172,7 +173,7 @@ https://github.com/rails/rails/compare/master...4-1-stable.patch
#### Compare branches across forked repositories
포크된 저장소간의 브랜치를 비교하려면 URL을 이렇게 변경하세요.
포크된 저장소 간의 브랜치를 비교하려면 URL을 이렇게 변경하세요.
```
https://github.com/{user}/{repo}/compare/{foreign-user}:{branch}...{own-branch}
@@ -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을 지금 보고 있는 페이지를 사실상 고정하도록 합니다. 코드가 바뀐다고 해도 이번에 본 내용을 다시 볼 수 있습니다.
지금 페이지에서 쓸 수 있는 모든 단축키를 보시려면 `?`를 누르세요.
@@ -253,7 +255,7 @@ Location: https://github.com/...
코드 파일 URL의 끝에 `#L52`를 추가하거나 줄 번호를 클릭하면 그 줄 번호를 하이라이트합니다.
`#L53-L60`처럼 범위지정도 가능합니다. 범위를 지정하려면 `shift`키를 누른 채 두 라인을 클릭하면 됩니다.
`#L53-L60`처럼 범위 지정도 가능합니다. 범위를 지정하려면 `shift`키를 누른 채 두 라인을 클릭하면 됩니다.
```
https://github.com/rails/rails/blob/master/activemodel/lib/active_model.rb#L53-L60
@@ -269,15 +271,15 @@ 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
같은 저장소의 다른 이슈를 링크하기 원한다면, `#`뒤에 이슈 번호만 입력하시면 자동으로 링크됩니다.
같은 저장소의 다른 이슈를 링크하기 원한다면, `#` 뒤에 이슈 번호만 입력하시면 자동으로 링크됩니다.
다른 저장소의 이슈를 링크하고 싶다면 `{user}/{repo}#이슈_번호`로 할 수 있습니다. (예 `tiimgreen/toc#12`)
@@ -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)
@@ -297,7 +299,7 @@ $ git commit -m "Fix screwup, fixes #12"
### CI Status on Pull Requests
정확히 설정되었다면, 풀 리퀘스트를 받거나 풀 리퀘스트에 새로운 커밋을 할 때 마다, [Travis CI](https://travis-ci.org/)가 풀 리퀘스트를 빌드 할 것입니다. [Travis CI 시작하기](http://docs.travis-ci.com/user/getting-started/)를 좀 더 읽어보세요.
정확히 설정되었다면, 풀 리퀘스트를 받거나 풀 리퀘스트에 새로운 커밋을 할 때마다, [Travis CI](https://travis-ci.org/)가 풀 리퀘스트를 빌드 할 것입니다. [Travis CI 시작하기](http://docs.travis-ci.com/user/getting-started/)를 좀 더 읽어보세요.
[![Travis CI status](https://cloud.githubusercontent.com/assets/1687642/2700187/3a88838c-c410-11e3-9a46-e65e2a0458cd.png)](https://github.com/octokit/octokit.rb/pull/452)
@@ -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`
@@ -320,8 +322,8 @@ $ git commit -m "Fix screwup, fixes #12"
`is:pr -label:activerecord`
GitHub는 열리거나 닫힌 이슈와 풀리퀘스트를 위한 탭이 있습니다만 머지된
풀리퀘스트도 볼 수 있습니다. 다음 필터를 입력하기만 하면 됩니다.
GitHub는 열리거나 닫힌 이슈와 풀 리퀘스트를 위한 탭이 있습니다만 머지된
리퀘스트도 볼 수 있습니다. 다음 필터를 입력하기만 하면 됩니다.
`is:merged`
@@ -355,15 +357,15 @@ 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)에서 확인하실 수 있습니다.
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/)에 있습니다.
GitHub에서 많이 사용하는 에모지 탑 5위는 이렇습니다.
@@ -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,11 +392,11 @@ GitHub에서 많이 사용하는 에모지 탑 5위는 이렇습니다.
![Peter don't care](http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif)
모든 이미지는 GitHub에서 케쉬합니다. 그래서 호스트가 죽어도 이미지는 여전히 남습니다.
모든 이미지는 GitHub에서 캐시합니다. 그래서 호스트가 죽어도 이미지는 여전히 남습니다.
#### Embedding Images in GitHub Wiki
이미지를 위키 페이지에넣는 방법은 여럿 있습니다. 위에 보이는 일반 마크다운 문법도 있지만, 이미지에 높이와 넓이를 지정할 수 있는 문법도 있습니다.
이미지를 위키 페이지에 넣는 방법은 여럿 있습니다. 위에 보이는 일반 마크다운 문법도 있지만, 이미지에 높이와 넓이를 지정할 수 있는 문법도 있습니다.
```markdown
[[ http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif | height = 100px ]]
@@ -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,13 +509,13 @@ _(크롬에서만 동작합니다)_
지킬로 작성된 페이지와 포스트에서, 저장소 정보는 예를 들어 `{{ 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
[Jekyll](http://jekyllrb.com/)이나 [GitHub Pages](http://pages.github.com/)같은 많은 블로그에서 포스트의 처음에 YAML 포멧의 메타데이터를 필요로 합니다. GitHub는 이 메타 정보를 읽기 편하게 테이블로 표시해 줍니다.
[Jekyll](http://jekyllrb.com/)이나 [GitHub Pages](http://pages.github.com/) 같은 많은 블로그에서 포스트의 처음에 YAML 포멧의 메타데이터를 필요로 합니다. GitHub는 이 메타 정보를 읽기 편하게 테이블로 표시해 줍니다.
![YAML metadata](https://camo.githubusercontent.com/47245aa16728e242f74a9a324ce0d24c0b916075/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f36343035302f313232383236372f65303439643063362d323761302d313165332d396464382d6131636432323539393334342e706e67)
@@ -517,15 +523,15 @@ Jemoji와 jekyll-mentions플러그인은 GitHub.com에서 처럼 [emoji](#emojis
### Rendering Tabular Data
GitHub는 `.csv` (comma-separated) 와 `.tsv` (tab-separated)파일에 대해 표(tabular) 데이터 보기를 지원합니다.
GitHub는 `.csv`(comma-separated)와 `.tsv`(tab-separated) 파일에 대해 표(tabular) 데이터 보기를 지원합니다.
![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)
@@ -536,20 +542,21 @@ GitHub에서 PDF를 렌더링할 수 있습니다.
풀 리퀘스트가 머지된 후에, 아무 도움이 안되거나 머지가 잘못된 결정이었다는 걸
눈치 챌 때가 있습니다.
풀 리퀘스트 페이지의 커밋의 오른 쪽에 있는 **Revert** 버튼을 클릭하면 이 풀리퀘스트를 되돌리는 풀리퀘스트를 만들어 되돌릴 수 있습니다.
풀 리퀘스트 페이지의 커밋의 오른쪽에 있는 **Revert** 버튼을 클릭하면 이 풀 리퀘스트를 되돌리는 풀 리퀘스트를 만들어 되돌릴 수 있습니다.
![Revert button](https://camo.githubusercontent.com/0d3350caf2bb1cba53123ffeafc00ca702b1b164/68747470733a2f2f6769746875622d696d616765732e73332e616d617a6f6e6177732e636f6d2f68656c702f70756c6c5f72657175657374732f7265766572742d70756c6c2d726571756573742d6c696e6b2e706e67)
[*풀 리퀘스트 되돌리기에 대해 더 읽어 보세요.*](https://github.com/blog/1857-introducing-the-revert-button)
### Diffs
#### Rendered Prose Diffs
GitHub에서 지원하는 산문(prose) 파일(예를 들어 Markdown)이 있는 커밋과 풀 리퀘스트에서는 *source*와 *rendered* 뷰 기능을 사용할 수 있습니다.
![Source / Rendered view](https://github-images.s3.amazonaws.com/help/repository/rendered_prose_diff.png)
"rendered" 버튼을 클릭하시면 렌더된 문서에서 변경을 확인하실 수 있습니다. 렌더된 산문(prose) 뷰는 문장을 추가, 삭제, 변경했을때 유용합니다.
"rendered" 버튼을 클릭하시면 렌더된 문서에서 변경을 확인하실 수 있습니다. 렌더된 산문(prose) 뷰는 문장을 추가, 삭제, 변경했을 때 유용합니다.
![Rendered Prose Diffs](https://f.cloud.github.com/assets/17715/2003056/3997edb4-862b-11e3-90be-5e9586edecd7.png)
@@ -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)
@@ -573,7 +580,7 @@ diff의 닫아둔 곳의 *펼침* 버튼을 클릭하면, 문맥을 더 볼 수
#### Diff or Patch of Pull Request
URL뒤에 `.diff` 나 `.patch`를 붙이면 풀 리퀘스트의 diff를 얻을 수 있습니다.
URL 뒤에 `.diff`나 `.patch`를 붙이면 풀 리퀘스트의 diff를 얻을 수 있습니다.
예를 들면
```
@@ -605,7 +612,7 @@ index 88fcf69..8614873 100644
#### Rendering and diffing images
GitHub는 PNG, JPG, GIF, PSD를 포함한 여러 일반 적인 이미지 형식을 표시할 수 있습니다. 추가적으로 이미지 형식의 diff를 표시하는 여러 방법을 제공합니다.
GitHub는 PNG, JPG, GIF, PSD를 포함한 여러 일반적인 이미지 형식을 표시할 수 있습니다. 추가적으로 이미지 형식의 diff를 표시하는 여러 방법을 제공합니다.
[![Diffable PSD](https://cloud.githubusercontent.com/assets/2546/3165594/55f2798a-eb56-11e3-92e7-b79ad791a697.gif)](https://github.com/blog/1845-psd-viewing-diffing
@@ -676,8 +683,8 @@ $ git rm $(git ls-files -d)
$ git status
On branch master
Changes not staged for commit:
deleted: a
deleted: c
deleted: a
deleted: c
$ git rm $(git ls-files -d)
rm 'a'
@@ -686,19 +693,13 @@ rm 'c'
$ git status
On branch master
Changes to be committed:
deleted: a
deleted: c
deleted: a
deleted: c
```
### 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,26 +728,26 @@ $ 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/)
### Checking out Pull Requests
풀 리퀘스트는 GitHub 저장소에서 사용하는 특별한 브랜치로 여러 방법으로 로컬로
가져 올수 있습니다.
가져올 수 있습니다.
빠르게 `diff`나 `merge`를 하기위해 특정 풀 리퀘스트를 임시로 `FETCH_HEAD`로
빠르게 `diff`나 `merge`를 하기 위해 특정 풀 리퀘스트를 임시로 `FETCH_HEAD`로
가져오려면 이렇게 합니다.
```bash
@@ -783,7 +784,7 @@ $ git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'
$ git checkout pr/42 pr-42
```
여러 저장소를 다루어야 한다면, 전역 깃 설정에서 풀 리퀘스트를 받을(fetching) 수 있도록 설정 할 수 도 있습니다.
여러 저장소를 다루어야 한다면, 전역 깃 설정에서 풀 리퀘스트를 받을(fetching) 수 있도록 설정 할 수도 있습니다.
```bash
git config --global --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
@@ -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
@@ -848,15 +851,15 @@ $ git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %C
![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)
[Palesz](http://stackoverflow.com/users/88355/palesz)님 고맙습니다.
[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,33 +873,35 @@ $ 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` 으로 여러 패턴을 조합
* `--and`, `--or`, `--not`으로 여러 패턴을 조합
이렇게 사용할 수 있습니다.
```bash
$ 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,11 +919,11 @@ $ git branch --no-merged
이 명령어는 현재 브랜치에 머지되지 않은 브랜치의 목록을 보여줍니다.
[* `branch` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-branch)
[*Git `branch` 커맨드에 대해 더 읽어 보세요.*](http://git-scm.com/docs/git-branch)
### Fixup and Autosquash
이전(HEAD의 한개 이상 전의) 커밋에 잘못된 부분이 있다면, 예를들어 `abcde`라면,
이전(HEAD의 한 개 이상 전의) 커밋에 잘못된 부분이 있다면, 예를 들어 `abcde`라면,
문제를 수정하고 밑의 커맨드를 입력해 고칠 수 있습니다.
```bash
@@ -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,19 +954,19 @@ Opens:
#### Aliases
알리아스는 커스텀 명령어를 등록할 수 있는 퍼입니다. 예를 들어 `git a`로 `git add --all`를 실행하게 할 수 있습니다.
알리아스는 커스텀 Git 명령어를 등록할 수 있는 퍼입니다. 예를 들어 `git a`로 `git add --all`를 실행하게 할 수 있습니다.
알리아스를 추가하려면 `~/.gitconfig`를 찾아 다음 포으로 입력하거나
알리아스를 추가하려면 `~/.gitconfig`를 찾아 다음 포으로 입력하거나
```
[alias]
co = checkout
cm = commit
p = push
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
co = checkout
cm = commit
p = push
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
```
커맨드 라인에서 다음 명령을 입력합니다.
@@ -970,19 +975,19 @@ Opens:
$ git config --global alias.new_alias git_function
```
예를들면
예를 들면
```bash
$ git config --global alias.cm commit
```
NOTE: 여러 함수를 알리아스하려면 따옴표를 이용하세요.
여러 함수를 알리아스하려면 따옴표를 이용하세요.
```bash
$ git config --global alias.ac 'add -A . && commit'
```
여기 몇 가지 권장 알리아스가 있습니다.
여기 몇 가지 유용한 알리아스가 있습니다.
| Alias | Current Command | What to Type |
| --- | --- | --- |
@@ -996,7 +1001,7 @@ $ git config --global alias.ac 'add -A . && commit'
| `git remotes` | `git remote -v` | `git config --global alias.remotes 'remote -v'` |
| `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 --"` |
*일부 알리아스는 [@mathiasbynens](https://github.com/mathiasbynens)님의 dotfiles에서 가져왔습니다.(https://github.com/mathiasbynens/dotfiles/blob/master/.gitconfig)*
*일부 알리아스는 [@mathiasbynens](https://github.com/mathiasbynens) 님의 dotfiles에서 가져왔습니다.(https://github.com/mathiasbynens/dotfiles/blob/master/.gitconfig)*
#### Auto-correct
@@ -1007,7 +1012,7 @@ $ git comit -m "Message"
# git: 'comit' is not a git command. See 'git --help'.
# Did you mean this?
# commit
# commit
```
`comit`을 쳤을 때 `commit`을 부르려면, 자동 교정을 켜두세요.
@@ -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 |