Skip to content
2 changes: 1 addition & 1 deletion BASE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
progit/progit2@98c409c69dfbfbdffdc4b6dd083940638d2dcb6e
progit/progit2@63e4c6230b22211ab6c83f7e0351e276becd2fa2
58 changes: 49 additions & 9 deletions book/01-introduction/sections/first-time-setup.asc
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ Each level overrides values in the previous level, so values in `.git/config` tr
//////////////////////////
On Windows systems, Git looks for the `.gitconfig` file in the `$HOME` directory (`C:\Users\$USER` for most people).
It also still looks for `/etc/gitconfig`, although it's relative to the MSys root, which is wherever you decide to install Git on your Windows system when you run the installer.
However, if you are using Git for Windows 2.x, it is `C:\Documents and Settings\All Users\Application Data\Git\config` on Windows XP, and it is `C:\ProgramData\Git\config` on Windows Vista and newer.
If you are using Git for Windows 2.x or later, there is also a system-level config file at
`C:\Documents and Settings\All Users\Application Data\Git\config` on Windows XP, and in `C:\ProgramData\Git\config` on Windows Vista and newer.
This config file can only be changed by `git config -f <file>` as an admin.
//////////////////////////
윈도에서는 `$HOME` 디렉토리에서 `.gitconfig` 파일을 찾는다(아마도 `C:\Users\$USER` 디렉토리).
윈도에서도 `/etc/gitconfig` 파일은 그 경로에서 찾는다. 이 경로는 아마도 MSys 루트의 상대경로일 텐데, MSys 루트는 인스톨러로 Git을 윈도에 설치할 때 결정된다.
'Git for Windows' 2.x 버전에서는 조금 다르다. 윈도 XP 사용자는 `C:\Documents and Settings\All Users\Application Data\Git\config` 디렉토리에서 찾을 수 있고 윈도 Vista 이후 버전 사용자는 `C:\ProgramData\Git\config`에서 찾을 수 있다.
이 시스템 설정 파일의 경로는 `git config -f <file>` 명령으로 변경할 수 있다. 관리자 권한이 필요하다.

//////////////////////////
==== Your Identity
Expand Down Expand Up @@ -84,28 +87,65 @@ GUI 도구들은 처음 실행할 때 이 설정을 묻는다.

//////////////////////////
Now that your identity is set up, you can configure the default text editor that will be used when Git needs you to type in a message.
If not configured, Git uses your system's default editor, which is generally Vim.
If not configured, Git uses your system's default editor, which is system dependant.
If you want to use a different text editor, such as Emacs, you can do the following:
//////////////////////////
사용자 정보를 설정하고 나면 Git에서 사용할 텍스트 편집기를 고른다.
기본적으로 Git은 시스템의 기본 편집기를 사용하고 보통 Vi나 Vim이다.
기본적으로 Git은 시스템의 기본 편집기를 사용해서 시스템마다 다르다.
하지만, Emacs 같은 다른 텍스트 편집기를 사용할 수 있고 아래와 같이 실행하면 된다.

[source,console]
----
$ git config --global core.editor emacs
----

//////////////////////////
While on a Windows system, if you want to use a different text editor, such as Notepad++, you can do the following:
//////////////////////////
윈도 사용자라면 다른 텍스트 편집기를 사용할 수 있다. 아래는 Notepad++를 사용하는 설정이다.

//////////////////////////
On a x86 system
//////////////////////////
x86 시스템

[source,console]
----
$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession"
----

//////////////////////////
On a x64 system
//////////////////////////
x64 시스템

[source,console]
----
$ git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession"
----

[NOTE]
//////////////////////////
====
Vim, Emacs and Notepad++ are popular text editors often used by developers on Unix based systems like Linux and OS X or a Windows system.
If you are not familiar with either of these editors, you may need to search for specific instructions for how to set up your favorite editor with Git.
====
//////////////////////////
====
Vim과 Emacs, Notepad++은 꽤 인기 있는 편집기로 개발자들이 즐겨 사용한다. OS X나 Linux 같은 Unix 시스템이나 윈도 시스템에서 사용 가능하다.
이 편집기가 불편해서 다른 편집기를 사용해야 한다면 Git 편집기로 설정하는 방법을 찾아봐야 한다.
====

[WARNING]
//////////////////////////
Vim and Emacs are popular text editors often used by developers on Unix based systems like Linux and Mac.
If you are not familiar with either of these editors or are on a Windows system, you may need to search for instructions for how to set up your favorite editor with Git.
If you don't set an editor like this and you don't know what Vim or Emacs are, you will likely get into a really confusing state when they are launched.
====
You may find, if you don't setup an editor like this, you will likely get into a really confusing state when they are launched.
Such example on a Windows system may include a prematurely terminated Git operation during a Git initiated edit.
====
//////////////////////////
====
Vim과 Emacs는 Mac과 Linux같은 Unix 시스템에서 개발자에게 꽤 인기있는 편집기다.
이 편집기가 불편하거나 윈도를 사용하거나 해서 다른 편집기를 사용해야 한다면 Git 편집기로 설정하는 방법을 찾아봐야 한다.
Vim이나 Emacs을 사용할 줄 모르고 다른 편집기로 설정하지도 못했는데 갑자기 실행되면 정말 멘붕이다.
자신의 편집기를 설정하지 않으면 갑자기 실행된 편집기에 당황할 수 있다.
그땐 당황하지 말고 편집기를 그냥 종료하면 Git 명령을 취소할 수 있다.
====

//////////////////////////
Expand Down
6 changes: 3 additions & 3 deletions book/01-introduction/sections/installing.asc
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ Git은 정말 이전 버전과 잘 호환되도록 유지하기 때문에 2.0

(((Linux, installing)))
//////////////////////////
If you want to install Git on Linux via a binary installer, you can generally do so through the basic package-management tool that comes with your distribution.
If you want to install the basic Git tools on Linux via a binary installer, you can generally do so through the basic package-management tool that comes with your distribution.
If you're on Fedora for example, you can use yum:
//////////////////////////
Linux에서 패키지로 Git을 설치할 때에는 보통 각 배포판에서 사용하는 패키지 관리도구를 사용하여 설치한다.
Fedora에서는 아래와 같이 한다.

[source,console]
----
$ sudo yum install git
$ sudo yum install git-all
----

//////////////////////////
Expand All @@ -51,7 +51,7 @@ Ubuntu같은 데비안류 배포판에서는 apt-get을 사용한다.

[source,console]
----
$ sudo apt-get install git
$ sudo apt-get install git-all
----

//////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions book/02-git-basics/sections/tagging.asc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Git 소스 저장소는 500여 개의 태그가 있다.

[source,console]
----
$ git tag -l 'v1.8.5*'
$ git tag -l "v1.8.5*"
v1.8.5
v1.8.5-rc0
v1.8.5-rc1
Expand Down Expand Up @@ -102,7 +102,7 @@ Annotated 태그를 만드는 방법은 간단하다.

[source,console]
----
$ git tag -a v1.4 -m 'my version 1.4'
$ git tag -a v1.4 -m "my version 1.4"
$ git tag
v0.1
v1.3
Expand Down
12 changes: 12 additions & 0 deletions book/03-git-branching/sections/remote-branches.asc
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,18 @@ Branch serverfix set up to track remote branch serverfix from origin.
Switched to a new branch 'serverfix'
----

//////////////////////////
In fact, this is so common that there's even a shortcut for that shortcut. If the branch name you're trying to checkout (a) doesn't exist and (b) exactly matches a name on only one remote, Git will create a tracking branch for you:
//////////////////////////
이 명령은 매우 자주 쓰여서 더 생략할 수 있다. 입력한 브랜치가 있는 (a) 리모트가 딱 하나 있고 (b) 로컬에는 없으면 Git은 트래킹 브랜치를 만들어 준다.

[source,console]
----
$ git checkout serverfix
Branch serverfix set up to track remote branch serverfix from origin.
Switched to a new branch 'serverfix'
----

//////////////////////////
To set up a local branch with a different name than the remote branch, you can easily use the first version with a different local branch name:
//////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion book/04-git-server/sections/git-daemon.asc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ So, in the following file

[source,console]
----
/etc/event.d/local-git-daemon
/etc/init/local-git-daemon.conf
----

//////////////////////////
Expand All @@ -65,6 +65,7 @@ stop on shutdown
exec /usr/bin/git daemon \
--user=git --group=git \
--reuseaddr \
--detach \
--base-path=/opt/git/ \
/opt/git/
respawn
Expand Down
47 changes: 25 additions & 22 deletions book/04-git-server/sections/smart-http.asc
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,23 @@ If you don't have Apache setup, you can do so on a Linux box with something like
[source,console]
----
$ sudo apt-get install apache2 apache2-utils
$ a2enmod cgi alias env
$ a2enmod cgi alias env rewrite
----

//////////////////////////
This also enables the `mod_cgi`, `mod_alias`, and `mod_env` modules, which are all needed for this to work properly.
This also enables the `mod_cgi`, `mod_alias`, `mod_env`, and `mod_rewrite` modules, which are all needed for this to work properly.
//////////////////////////
이 명령어 한 방이면 mod_cgi, mod_alias, mod_env도 사용할 수 있다. 다 앞으로 사용할 모듈들이다.
이 명령어 한 방이면 `mod_cgi`, `mod_alias`, `mod_env`, `mod_rewrite`도 사용할 수 있다. 다 앞으로 사용할 모듈들이다.

//////////////////////////
You’ll also need to set the Unix user group of the `/opt/git` directories to `www-data` so your web server can read- and write-access the repositories, because the Apache instance running the CGI script will (by default) be running as that user:
//////////////////////////
`/opt/git` 디렉토리의 Unix 사용자 그룹도 `www-data`로 설정해야 한다. 그래야 웹 서버가 저장소를 읽고 쓸 수 있다. Apache 인스턴스는 CGI 스크립트를 이 사용자로 실행시킨다(기본 설정이다).

[source,console]
----
$ chgrp -R www-data /opt/git
----

//////////////////////////
Next we need to add some things to the Apache configuration to run the `git http-backend` as the handler for anything coming into the `/git` path of your web server.
Expand All @@ -51,33 +61,26 @@ If you leave out `GIT_HTTP_EXPORT_ALL` environment variable, then Git will only
`GIT_HTTP_EXPORT_ALL` 환경 변수를 설정하지 않으면 `git-daemon-export-ok` 파일이 있는 저장소에는 아무나 다 접근할 수 있게 된다. 그냥 데몬 동작과 똑같다.

//////////////////////////
Then you'll have to tell Apache to allow requests to that path with something like this:
Finally you'll want to tell Apache to allow requests to `git-http-backend` and make writes be authenticated somehow, possibly with an Auth block like this:
//////////////////////////
다음엔 경로 설정을 해준다.
마지막으로 Apache가 `git-http-backend`에 요청하는 것을 허용하고 쓰기 접근 시 인증하게 한다.

[source,console]
----
<Directory "/usr/lib/git-core*">
Options ExecCGI Indexes
Order allow,deny
Allow from all
Require all granted
</Directory>
----

//////////////////////////
Finally you'll want to make writes be authenticated somehow, possibly with an Auth block like this:
//////////////////////////
마지막으로 인증 설정을 해준다.
RewriteEngine On
RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]
RewriteCond %{REQUEST_URI} /git-receive-pack$
RewriteRule ^/git/ - [E=AUTHREQUIRED]

[source,console]
----
<LocationMatch "^/git/.*/git-receive-pack$">
<Files "git-http-backend">
AuthType Basic
AuthName "Git Access"
AuthUserFile /opt/git/.htpasswd
Require valid-user
</LocationMatch>
Order deny,allow
Deny from env=AUTHREQUIRED
Satisfy any
</Files>
----

//////////////////////////
Expand All @@ -89,7 +92,7 @@ Here is an example of adding a ``schacon'' user to the file:

[source,console]
----
$ htdigest -c /opt/git/.htpasswd "Git Access" schacon
$ htpasswd -c /opt/git/.htpasswd schacon
----

//////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion book/06-github/sections/3-maintaining.asc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ For now, just click the ``Create Repository'' button, and boom – you have a ne
``Create Repository'' 버튼을 클릭하면 '뿅'하고 `<user>/<project_name>` 위치에 GitHub 저장소가 생긴다.

//////////////////////////
Since you have no code there yet, GitHub will show you instructions for how create a brand-new Git repository, or connect an existing Git project.
Since you have no code there yet, GitHub will show you instructions for how to create a brand-new Git repository, or connect an existing Git project.
We won't belabor this here; if you need a refresher, check out <<_git_basics_chapter>>.
//////////////////////////
아직 저장소에 코드가 하나도 없어서, GitHub은 Git 저장소를 만드는 방법이나 기존 Git 프로젝트를 넣는 방법을 보여준다.
Expand Down
2 changes: 1 addition & 1 deletion book/06-github/sections/5-scripting.asc
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ You can use the API to do just about anything you can do on the website -- creat
==== Pull Request의 상태 변경하기

//////////////////////////
One final example we'll look at since it's really useful if you're working with Pull Requests.
There is one final example we'll look at since it's really useful if you're working with Pull Requests.
Each commit can have one or more statuses associated with it and there is an API to add and query that status.
//////////////////////////
우리가 살펴볼 마지막 예제는 Pull Request에 관한 것인데 굉장히 유용하다.
Expand Down
10 changes: 4 additions & 6 deletions book/07-git-tools/sections/credentials.asc
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ Git Credential 기능이 제공하는 옵션은 아래와 같다.
The downside of this approach is that your passwords are stored in cleartext in a plain file in your home directory.
* If you're using a Mac, Git comes with an ``osxkeychain'' mode, which caches credentials in the secure keychain that's attached to your system account.
This method stores the credentials on disk, and they never expire, but they're encrypted with the same system that stores HTTPS certificates and Safari auto-fills.
* If you're using Windows, you can install a helper called ``winstore.''
* If you're using Windows, you can install a helper called ``wincred.''
This is similar to the ``osxkeychain'' helper described above, but uses the Windows Credential Store to control sensitive information.
It can be found at https://gitcredentialstore.codeplex.com[].
////////////////////
* 일단 기본적으로 아무런 설정도 하지 않으면 어떤 비밀번호도 저장하지 않는다.
이 경우 인증이 필요한 때 매번 사용자 이름과 비밀번호를 입력해야 한다.
Expand All @@ -44,9 +43,8 @@ Git Credential 기능이 제공하는 옵션은 아래와 같다.
``store'' 모드를 사용할 때 주의할 점은 인증정보가 사용자 홈 디렉토리 아래에 일반 텍스트 파일로 저장된다는 점이다.
* Mac에서 Git을 사용하는 경우 ``osxkeychain'' 모드를 사용하면 Mac에서 제공하는 Keychain 시스템에 사용자 이름과 비밀번호를 현재 로그인 계정에 속하게 저장한다.
``store'' 모드하면 인증정보를 Disk에 저장하고 인증정보가 만료되지 않는 점은 같지만, Safari 브라우저가 인증정보를 저장하는 것과 같은 수준으로 암호화해서 저장한다는 점이 다르다.
* 윈도우 환경에서는 ``winstore'' 라는 Helper가 있다.
* 윈도우 환경에서는 ``wincred'' 라는 Helper가 있다.
``osxkeychain'' Helper와 비슷하게 동작하며 Windows Credential Store를 사용하여 안전하게 인증정보를 저장한다.
https://gitcredentialstore.codeplex.com[] 사이트를 참고한다.

////////////////////
You can choose one of these methods by setting a Git configuration value:
Expand Down Expand Up @@ -245,10 +243,10 @@ https://bob:s3cre7@mygithost

////////////////////
It's just a series of lines, each of which contains a credential-decorated URL.
The `osxkeychain` and `winstore` helpers use the native format of their backing stores, while `cache` uses its own in-memory format (which no other process can read).
The `osxkeychain` and `wincred` helpers use the native format of their backing stores, while `cache` uses its own in-memory format (which no other process can read).
////////////////////
단순한 텍스트파일로 인증정보가 포함된 URL 형태로 저장한다.
`osxkeychain`이나 `winstore` Helper를 사용하면 OS에서 제공하는 좀 더 안전한 저장소에 인증정보를 저장한다. `cache` Helper의 경우 나름의 형식으로 메모리에 인증정보를 저장하고 다른 프로세스에서는 (메모리의 내용을) 읽어갈 수 없다.
`osxkeychain`이나 `wincred` Helper를 사용하면 OS에서 제공하는 좀 더 안전한 저장소에 인증정보를 저장한다. `cache` Helper의 경우 나름의 형식으로 메모리에 인증정보를 저장하고 다른 프로세스에서는 (메모리의 내용을) 읽어갈 수 없다.

////////////////////
==== A Custom Credential Cache
Expand Down
Loading