Merge pull request #54 from randomecho/para-p-da-wrapper-tag
Pair up dangling paragraph tags; Make sure all text at least in P
This commit is contained in:
commit
84c637485d
@ -95,6 +95,7 @@ $ git branch
|
|||||||
|
|
||||||
<p>So let's start by creating a new branch and switching to it. You can do
|
<p>So let's start by creating a new branch and switching to it. You can do
|
||||||
that by running <code>git branch (branchname)</code>.
|
that by running <code>git branch (branchname)</code>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
$ git branch testing
|
$ git branch testing
|
||||||
@ -306,7 +307,7 @@ class HiWorld
|
|||||||
revert to what it was before I switched branches. Here I can change
|
revert to what it was before I switched branches. Here I can change
|
||||||
something different (in this case the printed output) and at the same
|
something different (in this case the printed output) and at the same
|
||||||
time rename the file from <code>hello.rb</code> to <code>ruby.rb</code>.
|
time rename the file from <code>hello.rb</code> to <code>ruby.rb</code>.
|
||||||
</b>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<b>$ git checkout master</b>
|
<b>$ git checkout master</b>
|
||||||
@ -372,7 +373,7 @@ HiWorld.hello
|
|||||||
of code is edited in different branches there is no way for a computer
|
of code is edited in different branches there is no way for a computer
|
||||||
to figure it out, so it's up to us. Let's see another example of changing
|
to figure it out, so it's up to us. Let's see another example of changing
|
||||||
the same line in two branches.
|
the same line in two branches.
|
||||||
<p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<b>$ git branch</b>
|
<b>$ git branch</b>
|
||||||
@ -504,6 +505,7 @@ M README
|
|||||||
<code>git log</code> when you are in that branch. For example, if we run
|
<code>git log</code> when you are in that branch. For example, if we run
|
||||||
<code>git log</code> in the Hello World project that we have been working
|
<code>git log</code> in the Hello World project that we have been working
|
||||||
on in this section, we'll see all the commit messages that we've done.
|
on in this section, we'll see all the commit messages that we've done.
|
||||||
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<b>$ git log</b>
|
<b>$ git log</b>
|
||||||
|
@ -17,6 +17,7 @@ layout: reference
|
|||||||
public Git repository, as you would do if you wanted a copy or wanted to
|
public Git repository, as you would do if you wanted a copy or wanted to
|
||||||
work with someone on a project. We will cover both of these here.
|
work with someone on a project. We will cover both of these here.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -31,9 +32,10 @@ layout: reference
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
To create a repository from an existing directory of files, you can
|
<p>To create a repository from an existing directory of files, you can
|
||||||
simply run <code>git init</code> in that directory. For example,
|
simply run <code>git init</code> in that directory. For example,
|
||||||
let's say we have a directory with a few files in it, like this:
|
let's say we have a directory with a few files in it, like this:
|
||||||
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<b>$ cd konichiwa</b>
|
<b>$ cd konichiwa</b>
|
||||||
@ -41,27 +43,30 @@ layout: reference
|
|||||||
README hello.rb
|
README hello.rb
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
This is a project where we are writing examples of the "Hello World"
|
<p>This is a project where we are writing examples of the "Hello World"
|
||||||
program in every language. So far, we just have Ruby, but hey, it's
|
program in every language. So far, we just have Ruby, but hey, it's
|
||||||
a start. To start version controlling this with Git, we can simply
|
a start. To start version controlling this with Git, we can simply
|
||||||
run <code>git init</code>.
|
run <code>git init</code>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<b>$ git init</b>
|
<b>$ git init</b>
|
||||||
Initialized empty Git repository in /opt/konichiwa/.git/
|
Initialized empty Git repository in /opt/konichiwa/.git/
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
Now you can see that there is a <code>.git</code> subdirectory in your
|
<p>Now you can see that there is a <code>.git</code> subdirectory in your
|
||||||
project. This is your Git repository where all the data of your
|
project. This is your Git repository where all the data of your
|
||||||
project snapshots are stored.
|
project snapshots are stored.
|
||||||
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<b>$ ls -a</b>
|
<b>$ ls -a</b>
|
||||||
. .. .git README hello.rb
|
. .. .git README hello.rb
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
Congratulations, you now have a skeleton Git repository and can start
|
<p>Congratulations, you now have a skeleton Git repository and can start
|
||||||
snapshotting your project.
|
snapshotting your project.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p class="nutshell">
|
<p class="nutshell">
|
||||||
<strong>In a nutshell</strong>, you use <code>git init</code> to make an
|
<strong>In a nutshell</strong>, you use <code>git init</code> to make an
|
||||||
|
@ -417,7 +417,8 @@ index bb86f00..192151c 100644
|
|||||||
|
|
||||||
<p>That's what we're looking for, but we don't want to have to figure out
|
<p>That's what we're looking for, but we don't want to have to figure out
|
||||||
what commit the two branches diverged from every time. Luckily, Git has a
|
what commit the two branches diverged from every time. Luckily, Git has a
|
||||||
shortcut for this. If you run <code>git diff master...erlang</code> (with three dots in between the branch names), Git will automatically figure out
|
shortcut for this. If you run <code>git diff master...erlang</code> (with
|
||||||
|
three dots in between the branch names), Git will automatically figure out
|
||||||
what the common commit (otherwise known as the "merge base") of the two
|
what the common commit (otherwise known as the "merge base") of the two
|
||||||
commit is and do the diff off of that.</p>
|
commit is and do the diff off of that.</p>
|
||||||
|
|
||||||
|
@ -315,6 +315,7 @@ From github.com:schacon/hw
|
|||||||
<p>If you have more than one remote repository, you can either fetch from specific
|
<p>If you have more than one remote repository, you can either fetch from specific
|
||||||
ones by running <code>git fetch [alias]</code> or you can tell Git to synchronize
|
ones by running <code>git fetch [alias]</code> or you can tell Git to synchronize
|
||||||
with all of your remotes by running <code>git fetch --all</code>.
|
with all of your remotes by running <code>git fetch --all</code>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p class="nutshell">
|
<p class="nutshell">
|
||||||
<b>In a nutshell</b> you run <code>git fetch [alias]</code> to synchronize your
|
<b>In a nutshell</b> you run <code>git fetch [alias]</code> to synchronize your
|
||||||
@ -358,7 +359,7 @@ To git@github.com:schacon/hw.git
|
|||||||
what I have committed and all of its history.</p>
|
what I have committed and all of its history.</p>
|
||||||
|
|
||||||
<p>What if I have a topic branch like the 'erlang' branch we created earlier
|
<p>What if I have a topic branch like the 'erlang' branch we created earlier
|
||||||
and I just want to share that? You can just push that branch instead.
|
and I just want to share that? You can just push that branch instead.</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<b>$ git push github erlang</b>
|
<b>$ git push github erlang</b>
|
||||||
@ -403,6 +404,7 @@ fast-forwards' section of 'git push --help' for details.
|
|||||||
|
|
||||||
<p>You can fix this by running <code>git fetch github; git merge github/master</code>
|
<p>You can fix this by running <code>git fetch github; git merge github/master</code>
|
||||||
and then pushing again.
|
and then pushing again.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p class="nutshell">
|
<p class="nutshell">
|
||||||
<b>In a nutshell</b> you run <code>git push [alias] [branch]</code> to update a
|
<b>In a nutshell</b> you run <code>git push [alias] [branch]</code> to update a
|
||||||
|
@ -79,6 +79,7 @@ $ git branch
|
|||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<p>我们动手创建一个分支,并切换过去。执行 <code>git branch (branchname)</code> 即可。
|
<p>我们动手创建一个分支,并切换过去。执行 <code>git branch (branchname)</code> 即可。
|
||||||
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
$ git branch testing
|
$ git branch testing
|
||||||
@ -334,7 +335,7 @@ HiWorld.hello
|
|||||||
<p>那么,Git 合并很有魔力,我们再也不用处理合并冲突了,对吗?不太确切。
|
<p>那么,Git 合并很有魔力,我们再也不用处理合并冲突了,对吗?不太确切。
|
||||||
不同分支中修改了相同区块的代码,电脑自己猜不透神马的情况下,冲突就摆在我们面前了。
|
不同分支中修改了相同区块的代码,电脑自己猜不透神马的情况下,冲突就摆在我们面前了。
|
||||||
我们看看两个分支中改了同一行代码的例子。
|
我们看看两个分支中改了同一行代码的例子。
|
||||||
<p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<b>$ git branch</b>
|
<b>$ git branch</b>
|
||||||
|
@ -27,7 +27,8 @@ layout: zh_reference
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
在目录中执行 <code>git init</code>,就可以创建一个 Git 仓库了。比如,我们恰好有个目录,里头有些许文件,如下:
|
<p>在目录中执行 <code>git init</code>,就可以创建一个 Git 仓库了。比如,我们恰好有个目录,里头有些许文件,如下:
|
||||||
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
<b>$ cd konichiwa</b>
|
<b>$ cd konichiwa</b>
|
||||||
<b>$ ls</b>
|
<b>$ ls</b>
|
||||||
@ -54,7 +55,8 @@ Initialized empty Git repository in /opt/konichiwa/.git/
|
|||||||
. .. .git README hello.rb
|
. .. .git README hello.rb
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
恭喜,现在你就有了一个 Git 仓库的架子,可以开始快照你的项目了。
|
<p>恭喜,现在你就有了一个 Git 仓库的架子,可以开始快照你的项目了。
|
||||||
|
</p>
|
||||||
|
|
||||||
<p class="nutshell">
|
<p class="nutshell">
|
||||||
<strong>简而言之</strong>,用 <code>git init</code> 来在目录中创建新的 Git 仓库。
|
<strong>简而言之</strong>,用 <code>git init</code> 来在目录中创建新的 Git 仓库。
|
||||||
|
@ -437,7 +437,7 @@ index bb86f00..192151c 100644
|
|||||||
2 files changed, 9 insertions(+), 0 deletions(-)
|
2 files changed, 9 insertions(+), 0 deletions(-)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>当然,我会推荐简单点的那个。</>
|
<p>当然,我会推荐简单点的那个。</p>
|
||||||
|
|
||||||
|
|
||||||
<p class="nutshell">
|
<p class="nutshell">
|
||||||
|
Loading…
Reference in New Issue
Block a user