Skip to content

Commit 5a5b1be

Browse files
committed
Merge pull request #1 from vinhnx/gh-pages
Translate into Vietnamese. Add some links to resources and guides. Add new misc section.
2 parents 2910b5d + 0f15961 commit 5a5b1be

File tree

1 file changed

+66
-57
lines changed

1 file changed

+66
-57
lines changed

index_vi.html

Lines changed: 66 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6-
<title>git - the simple guide - no deep shit!</title>
6+
<title>git - hướng dẫn đơn giản</title>
77
<link href='http://fonts.googleapis.com/css?family=Chelsea+Market' rel='stylesheet' type='text/css'>
88
<link rel="stylesheet" href="css/normalize.css" type="text/css">
99
<link rel="stylesheet" href="css/style.css" type="text/css">
@@ -49,7 +49,7 @@ <h1>Sổ tay Git</h1>
4949
<a href="index.ko.html">한국어</a>
5050
<a href="index.vi.html">Vietnamese</a>
5151
<br />
52-
please report issues on <a href="https://github.com/hnq90/git-guide/issues">github</a>
52+
vui lòng báo cáo vấn đề trên <a href="https://github.com/hnq90/git-guide/issues">github</a>
5353
</p>
5454
<div class="announcement">
5555
<a href="http://frontify.com/?utm_source=gitguide&amp;utm_campaign=founder_frontify">
@@ -61,7 +61,7 @@ <h1>Sổ tay Git</h1>
6161
<!-- setup -->
6262
<a name="setup"></a>
6363
<div class="scrollblock block-setup">
64-
<h2>setup</h2>
64+
<h2>cài đặt</h2>
6565
<p>
6666
<a href="http://code.google.com/p/git-osx-installer/downloads/list?can=3">Tải git về cho OSX</a>
6767
</p>
@@ -77,7 +77,7 @@ <h2>setup</h2>
7777
<h2>Tạo một repository mới</h2>
7878
<p>
7979
Để tạo 1 repository mới, bạn hãy mở cửa sổ lẹnh và gõ dòng lệnh sau <br />
80-
<code>git init</code><br />.
80+
<code>git init</code><br />
8181
</p>
8282
</div>
8383
<a name="checkout"></a>
@@ -92,119 +92,119 @@ <h2>Sao chép một repository</h2>
9292
</div>
9393
<a name="trees"></a>
9494
<div class="scrollblock block-trees">
95-
<h2>workflow</h2>
95+
<h2>quy trình làm việc</h2>
9696
<p>
97-
your local repository consists of three "trees" maintained by git.
98-
the first one is your <code>Working Directory</code> which holds the actual files.
99-
the second one is the <code>Index</code> which acts as a staging area and
100-
finally the <code>HEAD</code> which points to the last commit you've made.
97+
thư mục cục bộ của bạn bao gồm ba "trees" được duy trì bởi git.
98+
cái đầu tiên là <code>Thư Mục Đang Làm Việc (Working Directory)</code> có chứa các tập tin hiện tại.
99+
cái thứ hai là <code>Chỉ Mục (Index)</code> đóng vai trò như staging area
100+
cuối cùng là <code>HEAD</code> trỏ đến commit gần đây nhất của bạn.
101101
</p>
102102
<img src="img/trees.png" alt="" />
103103
</div>
104104
<a name="add"></a>
105105
<div class="scrollblock block-add">
106-
<h2>add &amp; commit</h2>
106+
<h2>thêm &amp; commit</h2>
107107
<p>
108-
You can propose changes (add it to the <b>Index</b>) using<br />
109-
<code>git add &lt;filename&gt;</code><br />
108+
Bạn có thể đề xuất thay đổi (thêm nó vào chỉ mục <b>Index</b>) bằng cách<br />
109+
<code>git add &lt;tên-tập-tin&gt;</code><br />
110110
<code>git add *</code><br />
111-
This is the first step in the basic git workflow. To actually commit these changes use<br />
112-
<code>git commit -m "Commit message"</code><br />
113-
Now the file is committed to the <b>HEAD</b>, but not in your remote repository yet.
111+
Đây là bước đầu tiên trong quy trình git cơ bản. Để thật sự commit những thay đổi, bạn sử dụng<br />
112+
<code>git commit -m "Ghi chú Commit"</code><br />
113+
Bây giờ thì tập tin đã được commit đến <b>HEAD</b>, nhưng chưa phải trên thư mục remote.
114114
</p>
115115
</div>
116116
<a name="push"></a>
117117
<div class="scrollblock block-remote">
118-
<h2>pushing changes</h2>
118+
<h2>đẩy các thay đổi</h2>
119119
<p>
120-
Your changes are now in the <b>HEAD</b> of your local working copy. To send those changes to your remote repository, execute <br />
120+
Thay đổi của bạn hiện đang nằm tại <b>HEAD</b> của bản sao cục bộ đang làm việc. Để gửi những thay đổi đó đến repository remote, bạn thực thi<br />
121121
<code>git push origin master</code><br />
122-
Change <i>master</i> to whatever branch you want to push your changes to.
122+
Thay đổi <i>master</i> bằng bất cứ nhánh nào mà bạn muốn đầy những thay đổi đến.
123123
<br /><br />
124-
If you have not cloned an existing repository and want to connect your repository to a remote server, you need to add it with<br />
125-
<code>git remote add origin &lt;server&gt;</code><br />
126-
Now you are able to push your changes to the selected remote server<br />
124+
Nếu bạn chưa clone một repository hiện có và muốn kết nối repository của bạn đến máy chủ remote, bạn phải thêm nó với<br />
125+
<code>git remote add origin &lt;máy-chủ&gt;</code><br />
126+
Bây giờ bạn đã có thể đẩy các thay đổi của mình vào máy chủ đã chọn<br />
127127

128128
</p>
129129
</div>
130130
<a name="branching"></a>
131131
<div class="scrollblock block-branching">
132-
<h2>branching</h2>
132+
<h2>nhánh</h2>
133133
<p>
134-
Branches are used to develop features isolated from each other. The <i>master</i> branch is the "default" branch when you create a repository. Use other branches for development and merge them back to the master branch upon completion.
134+
Các nhánh (branches) được dùng để phát triển tính năng tách riêng ra từ những nhánh khác. Nhánh <i>master</i> là nhánh "mặc định" khi bạn tạo một repository. Sử dụng các nhánh khác tri đang trong giai đoạn phát triển và merge trở lại nhánh master một khi đã hoàn tất.
135135
</p>
136136
<img src="img/branches.png" alt="" />
137137
<p>
138-
create a new branch named "feature_x" and switch to it using<br />
138+
tạo một nhánh mới và đặt tên là "feature_x" và chuyển qua nhánh đó (từ master) bằng cách<br />
139139
<code>git checkout -b feature_x</code><br />
140-
switch back to master<br />
140+
trở lại nhánh master<br />
141141
<code>git checkout master</code><br />
142-
and delete the branch again<br />
142+
và xóa nhánh feature_x đó lần nửa<br />
143143
<code>git branch -d feature_x</code><br />
144-
a branch is <i>not available to others</i> unless you push the branch to your remote repository<br />
145-
<code>git push origin &lt;branch&gt;</code>
144+
một nhánh <i>không có giá trị với các nhánh khác</i> trừ khi bạn đẩy nhánh đó đến remote repository<br />
145+
<code>git push origin &lt;nhánh&gt;</code>
146146
</p>
147147
</div>
148148
<a name="update"></a>
149149
<div class="scrollblock block-merging">
150-
<h2>update &amp; merge</h2>
150+
<h2>cập nhật &amp; trộn (update &amp; merge)</h2>
151151
<p>
152-
to update your local repository to the newest commit, execute <br />
152+
để cập nhật repository cục bộ của bạn và commit mới nhất, thực thi<br />
153153
<code>git pull</code><br />
154-
in your working directory to <i>fetch</i> and <i>merge</i> remote changes.<br />
155-
to merge another branch into your active branch (e.g. master), use<br />
156-
<code>git merge &lt;branch&gt;</code><br />
157-
in both cases git tries to auto-merge changes. Unfortunately, this is not always possible and results in <i>conflicts</i>.
158-
You are responsible to merge those <i>conflicts</i>
159-
manually by editing the files shown by git. After changing, you need to mark them as merged with<br />
160-
<code>git add &lt;filename&gt;</code><br />
161-
before merging changes, you can also preview them by using<br />
162-
<code>git diff &lt;source_branch&gt; &lt;target_branch&gt;</code>
154+
trong thự mục đang làm việc để <i>lấy về (fetch)</i> <i>trộn (merge)</i> các thay đổi ở remote.<br />
155+
để trộn một nhánh khác vào nhánh đang hoạt động (vd: master), sử dụng<br />
156+
<code>git merge &lt;nhánh&gt;</code><br />
157+
trong cả hai trường hợp, git cố gắng trộn tự động (auto-merge) các thay đổi. Không may, điều này không phải lúc nào cũng làm được và thường dẫn đến <i>xung đột</i>.
158+
Trách nhiệm của bạn là trộn <i>các xung đột</i> đó
159+
thủ công bằng cách chỉnh sửa các tập tin được hiển thị bởi git. Sau khi thay đổi, bạn phải đánh dấu chúng là đã được trộn (merged) với lệnh<br />
160+
<code>git add &lt;tên-tập-tin&gt;</code><br />
161+
trước khi trộn các thay đổi, bạn có thể xem trước chúng bằng các<br />
162+
<code>git diff &lt;nhánh_nguồn&gt; &lt;nhánh_mục_tiêu&gt;</code>
163163
</p>
164164
</div>
165165
<a name="tagging"></a>
166166
<div class="scrollblock block-tagging">
167-
<h2>tagging</h2>
167+
<h2>gắn nhãn (tagging)</h2>
168168
<p>
169-
it's recommended to create tags for software releases. this is a known concept, which also exists in SVN. You can create a new tag named <i>1.0.0</i> by executing<br />
169+
người ta khuyên nên tạo nhãn (tags) khi phát hành phần mềm. đây là khái niệm được biết đền, đã từng có trên SVN. Bạn tạo tag mới tên là <i>1.0.0</i> bằng cách<br />
170170
<code>git tag 1.0.0 1b2e1d63ff</code><br />
171-
the <i>1b2e1d63ff</i> stands for the first 10 characters of the commit id you want to reference with your tag. You can get the commit id with <br />
171+
chuỗi <i>1b2e1d63ff</i> là 10 ký tự đầu tiên của mã commit (commit id) mà bạn muốn tham chiếu đến bằng nhãn của bạn. Bạn có thể lấy mã commit với lệnh <br />
172172
<code>git log</code><br />
173-
you can also use fewer characters of the commit id, it just has to be unique.
173+
bạn cũng có thể sử dụng ít ký tự hơn từ mã commit, nó chỉ cần phải là duy nhất.
174174
</p>
175175
</div>
176176
<a name="checkout-replace"></a>
177177
<div class="scrollblock block-checkout-replace">
178-
<h2>replace local changes</h2>
178+
<h2>thay thế các thay đổi cục bộ</h2>
179179
<p>
180-
In case you did something wrong (which for sure never happens ;) you can replace local changes using the command<br />
181-
<code>git checkout -- &lt;filename&gt;</code><br />
182-
this replaces the changes in your working tree with the last content in HEAD. Changes already added to the index, as well as new files, will be kept.
180+
Trong trường hợp bạn làm sai điểu gì đó, bạn có thể thay thế các thay đổi cục bộ bằng lệnh<br />
181+
<code>git checkout -- &lt;tên-tập-tin&gt;</code><br />
182+
lệnh này thay thế những thay đổi trong "tree" đang làm việc với nội dung mới nhất của HEAD. Các thay đổi đã được thêm vào chỉ mục, kể cả các tập tin mới, điều này sẽ được giữ lại.
183183
</p>
184184
<p>
185-
If you instead want to drop all your local changes and commits, fetch the latest history from the server and point your local master branch at it like this<br />
185+
Nếu bạn muốn hủy tất cả thay đổi và commit cục bộ, lấy về (fetch) lịch sử gần đây nhất từ máy chỉ và trỏ nhánh master cục bộ vào nó như sau<br />
186186
<code>git fetch origin</code><br />
187187
<code>git reset --hard origin/master</code>
188188
</p>
189189
</div>
190190
<a name="hints"></a>
191191
<div class="scrollblock block-hints">
192-
<h2>useful hints</h2>
192+
<h2>các gợi ý hữu ích</h2>
193193
<p>
194-
built-in git GUI<br />
194+
git GUI tích hợp sẵn<br />
195195
<code>gitk</code><br />
196-
use colorful git output<br />
196+
sử dụng kết quả git với nhiều màu<br />
197197
<code>git config color.ui true</code><br />
198-
show log on just one line per commit<br />
198+
hiện log trên chỉ một dùng mỗi commit<br />
199199
<code>git config format.pretty oneline</code><br />
200-
use interactive adding<br />
200+
sử dụng thêm tập tin tương tác<br />
201201
<code>git add -i</code>
202202
</p>
203203
</div>
204204
<a name="resources"></a>
205205
<div class="scrollblock block-resources">
206-
<h2>links & resources</h2>
207-
<h3>graphical clients</h3>
206+
<h2>các liên kết và tài nguyên</h2>
207+
<h3>trình sử dụng có đồ họa</h3>
208208
<p>
209209
<ul>
210210
<li><a href="http://gitx.laullon.com/">GitX (L) (OSX, open source)</a></li>
@@ -214,20 +214,29 @@ <h3>graphical clients</h3>
214214
<li><a href="https://itunes.apple.com/gb/app/gitbox/id403388357?mt=12">GitBox (OSX, App Store)</a></li>
215215
</ul>
216216
</p>
217-
<h3>guides</h3>
217+
<h3>hướng dẫn</h3>
218218
<p>
219219
<ul>
220220
<li><a href="http://book.git-scm.com/">Git Community Book</a></li>
221221
<li><a href="http://progit.org/book/">Pro Git</a></li>
222222
<li><a href="http://think-like-a-git.net/">Think like a git</a></li>
223223
<li><a href="http://help.github.com/">GitHub Help</a></li>
224224
<li><a href="http://marklodato.github.com/visual-git-guide/index-en.html">A Visual Git Guide</a></li>
225+
<li><a href="http://pcottle.github.io/learnGitBranching/">Learn Git Branching</a></li>
226+
<li><a href="http://zachholman.com/talk/more-git-and-github-secrets/">More Git and GitHub Secrets</a></li>
227+
<li><a href="http://www.sbf5.com/~cduan/technical/git/">Understanding Git Conceptually</a></li>
225228
</ul>
226229
</p>
230+
<h3>misc</h3>
231+
<p>
232+
<ul>
233+
<li><a href="https://github.com/FredrikNoren/ungit">ungit - The easiest way to use git. On any platform. Anywhere.</a></li>
234+
</ul>
235+
</p>
227236
</div>
228237
<a name="comments"></a>
229238
<div class="scrollblock block-comments">
230-
<h2>comments</h2>
239+
<h2>bình luận</h2>
231240
<div id="disqus_thread"></div>
232241
<script type="text/javascript">
233242
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */

0 commit comments

Comments
 (0)