Skip to content

Commit

Permalink
finish try and new ui for slide
Browse files Browse the repository at this point in the history
  • Loading branch information
dylandy committed Jun 20, 2013
1 parent 3031f5b commit 8a81b9e
Show file tree
Hide file tree
Showing 9 changed files with 145 additions and 34 deletions.
3 changes: 2 additions & 1 deletion css/slide.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ body{
.span6{
border:0.3em solid gray;
margin-top: 5em;
margin-left: 25em;
margin-left: 5em;
padding:0.5em;
border-radius: 1em;
}
iframe{
Expand Down
20 changes: 20 additions & 0 deletions css/start.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
body{
overflow-x:hidden;
}
div .span5{
margin-left:20em;
}
section{
margin-top:3em;

}
h3{
text-align:center;
}
section p {
text-align:justify;
margin-left:15em;
}
section ul{
margin-left:15em;
}
5 changes: 4 additions & 1 deletion css/try.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
body{
overflow-x:hidden;
}
.span8{
.span9{
border-radius: 1em;
border:0.3em solid gray;
margin-top: 5em;
margin-left:17em;
text-align:center;
padding:1em;
}
46 changes: 23 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ <h3>物件模式(Object Mode)</h3>
<hr>
<div>
<h3>Git 參照 ( Git References )</h3>
你可以執行像<code> git log 1a410e </code>這樣的命令來查看完整的歷史,但是這樣你就要記得 1a410e 是你最後一次提交,这样才能在提交歷史中找到这些物件。你需要一個檔案來用一個簡单的名字來記錄這些 SHA-1 值,這樣你就可以用這些指針而不是原來的 SHA-1 值去檢索了。在 Git 中,我們稱之為“參照”(references or refs)。
你可以執行像<pre> git log 1a410e </pre>這樣的命令來查看完整的歷史,但是這樣你就要記得 1a410e 是你最後一次提交,這樣才能在提交歷史中找到這些物件。你需要一個檔案來用一個簡單的名字來記錄這些 SHA-1 值,這樣你就可以用這些指針而不是原來的 SHA-1 值去檢索了。在 Git 中,我們稱之為“參照”(references or refs)。
<ol style="margin-top:1em">
<li><b>head</b>: 是一個指向你當前所在分支的引用標示符號。</li>
<li><b>tag</b>: tag 是一個物件也是一個引用,我們在之前已經做過了詳細的說明。</li>
Expand Down Expand Up @@ -311,49 +311,49 @@ <h3>將本機 repository 和 Github repository 同步</h3>
<p>
打開空的 repository,Github 會指示你如何將本機 repository remote 到 Git 的 repository
進入到本機的 repository 資料夾之中,並輸入以下指令,即可連線並把目前的 repository 同步到 Github 上面了。<br>
<code>
git remote add origin [email protected]:your_account/sandbox.git<br>
git push -u origin master<br>
</code>
<pre>
git remote add origin [email protected]:your_account/sandbox.git<br>
git push -u origin master<br>
</pre>
之後只需要<br>
<code>
git push<br>
</code> 即可
<pre>
git push<br>
</pre> 即可
</p>
<hr>
<h3>Folk 其他使用者的專案</h3>
<p>
Fork 是一個較為特殊的稱呼方式,意思是講其他使用者的 repository 複製到本機,我也可以直接透過他的 repository 來自己修改這個專案,讓這個專案更好。<br>
如果你有寫入權限的話(被加入成Collaborators),就可以用 SSH 協定 Clone 下來:<br>
<code>
<pre>
git clone [email protected]:Username/repository.git <br><br>
</code>
</pre>
如果沒有寫入權限 (Collaborators)的話,因為這個專案是公開的,所以你還是可以用 Git 協定 Clone 下來:<br>
<code>
<pre>
git clone git://github.com/Username/repository.git<br>
</code>
</pre>
<br>
如果有防火牆問題,改用 HTTPS 協定:<br>
<code>
<pre>
git clone https://github.com/Username/repository.git
</code>
</pre>
</p>
<hr>
<h3>Pull - 從遠端更新</h3>
<hr>
<p>
<code>
<pre>
git pull 或 git pull origin master<br>
</code>
</pre>
實際作用是先 git fetch 遠端的 branch,然後與本地端的 branch 做 merge,產生一個 merge commit 節點
</p>
<hr>
<h3>Push - 將 Commit 送出去</h3>
<hr>
<p>
<code>
git push 或 git push origin master<br>
</code>
<pre>
git push 或 git push origin master<br>
</pre>
實際的作用是將本地端的 master branch 與遠端的 master branch 作 fast-forward 合併。如果出現 [rejected] 錯誤的話,表示你必須先作 pull。
</p>
<hr>
Expand Down Expand Up @@ -383,11 +383,11 @@ <h2>Git 的應用</h2>
<p>
<h4>台灣法律沿革</h4>
github repository :<br/>
<code>
<pre>
<a href="https://github.com/victorhsieh/tw-law-corpus">
https://github.com/victorhsieh/tw-law-corpus
</a>
</code>
</pre>
</p>
</div>
<div id="tpe_mrt">
Expand All @@ -397,11 +397,11 @@ <h4>台北捷運路線</h4>
<img src="http://gugod.org/2009/12/12/3389620_29acb2fe86d3e03e7f8c665c4225c454.jpg" style="margin-left:12em"><br>
</a>
github repository :<br>
<code>
<pre>
<a href="https://github.com/gugod/Taipei-MRT-In-Git">
https://github.com/gugod/Taipei-MRT-In-Git
</a>
</code>
</pre>
</p>
</div>
</div>
Expand Down
21 changes: 15 additions & 6 deletions slide.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
<h3 style="text-align:center">自由軟體鑄造場 ihower 教學 01</h3><hr>
<iframe width="420" height="315" src="http://www.youtube.com/embed/BJSFGGfpRSU" frameborder="0" allowfullscreen></iframe>
</div>
</div>

<div class="row">
<div class="span6">
<h3 style="text-align:center">自由軟體鑄造場 ihower 教學 02</h3><hr>
<iframe width="420" height="315" src="http://www.youtube.com/embed/26vazDnt1rE" frameborder="0" allowfullscreen></iframe>
Expand All @@ -47,13 +44,25 @@ <h3 style="text-align:center">自由軟體鑄造場 ihower 教學 02</h3><hr>
<div class="row">
<div class="span6">
<h3 style="text-align:center">寫給大家的 Git 教學</h3><hr>
<iframe src="http://www.slideshare.net/slideshow/embed_code/5528339" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/littlebtc/git-5528339" title="寫給大家的 Git 教學" target="_blank">寫給大家的 Git 教學</a> </strong> from <strong><a href="http://www.slideshare.net/littlebtc" target="_blank">littlebtc</a></strong> </div>
<iframe src="http://www.slideshare.net/slideshow/embed_code/5528339" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/littlebtc/git-5528339" target="_blank">寫給大家的 Git 教學</a> </strong> from <strong><a href="http://www.slideshare.net/littlebtc" target="_blank">littlebtc</a></strong> </div>
</div>
<div class="span6">
<h3 style="text-align:center">Git Tutorial 教學</h3><hr>
<iframe src="http://www.slideshare.net/slideshow/embed_code/13695342" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/ihower/git-tutorial-13695342" target="_blank">Git Tutorial 教學</a> </strong> from <strong><a href="http://www.slideshare.net/ihower" target="_blank">Wen-Tien Chang</a></strong> </div>
</div>
</div>
<div class="row">
<div class="span6">
<h3 style="text-align:center">Git Tutorial 教學</h3><hr>
<iframe src="http://www.slideshare.net/slideshow/embed_code/13695342" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="http://www.slideshare.net/ihower/git-tutorial-13695342" title="Git Tutorial 教學" target="_blank">Git Tutorial 教學</a> </strong> from <strong><a href="http://www.slideshare.net/ihower" target="_blank">Wen-Tien Chang</a></strong> </div>
<h3 style="text-align:center">Pro Git 教學讀本</h3>
<a href="http://git-scm.com/book/zh-tw">
<img src="http://i.imgur.com/rNFUfVq.png" style="margin-left:6em"/>
</a>
</div>
<div class="span6">
<h3 style="text-align:center">Git 版本控制精要</h3>
<a href="http://ihower.tw/git/">
<img src="http://i.imgur.com/ivJiT0k.png" width="390px" style="margin-left:6em;padding-bottom:0.35em"/>
</a>
</div>
</div>
</section>
Expand Down
Binary file added source/tut_copy.swf
Binary file not shown.
Binary file added source/tut_normal.swf
Binary file not shown.
78 changes: 77 additions & 1 deletion start.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,83 @@
</header>
<article id="main" class="fluid">
<section>

<h3>安裝 Git</h3>
<hr>
<p>
Git 可以在各種不同的系統下使用,下面有各個系統下的安裝方式說明:<br>
<ul>
<li>
<a href="https://help.github.com/articles/set-up-git#platform-windows">
Windows 安裝 Git
</a>
</li>
<li>
<a href="https://help.github.com/articles/set-up-git#platform-mac">
Mac OSX 安裝 Git
</a>
</li>
<li>
<a href="https://help.github.com/articles/set-up-git">
Linux 安裝 Git
</a>
</li>
</ul>
</p>
<hr>
<h3>設定自己的 Git</h3>
<p>
Git 在裝好以後需要進行一些設定,有很多不同的類別,以下會一一進行說明。<br>
每一個 Commit 提交,都會有 Commit 人的資訊,像是姓名和 email ,我們可以用以下的
指令來進行設定。<br><br>
<pre>
$ git config --global user.name "Your Name" <br>
$ git config --global user.email "User at email.com"
</pre>
</p>
<p>
中間的 <code> --global</code> 代表全域設定,所有的設定都會放在家目錄的 .gitconfig 檔案裏面
可以用編輯器開啟來檢視及編輯。<br><br>
<pre>
$cat ~/.gitconfig
[user]
name = Username
email = user at email.com
[alias]
ci = commit
st = status
ch = checkout
[color]
ui = true
[core]
editor = vim
</pre>
</p>
<p>
使用終端機來操作 Git 常會讓人覺得一直打指令很繁瑣,因此 Git 也有提供 alias 的功能,
例如你可以將 git status 縮寫為 git st,git checkout 縮寫為 git co 等,你只要這樣設定:
<pre>
$ git config --global alias.st status
</pre>
</p>
<p>
在 Git 中預設輸出是沒有顏色的,為了方便的閱讀及使用體驗,我們勢必得加上一點點綴,讓我們
在使這個工具的時後能夠更方便更直覺的操作。
<pre>
$ git config --global color.ui true
</pre>
</p>
<p>
而在 Git 中又有許多的事件是需要透過編輯器來讓使用者確定是否有問題,抑或是需要使用者去修改
在程序上所發生的錯誤,這個時候 Git 會自動跳出編輯器,所以我們需要設定一個常用的編輯器來作為
預設編輯器,一般我們會使用<a href="http://www.vim.org/"> vim</a> 作為編輯器,因為各種機器、
各種系統都有內建這個好用的編輯器。
<pre>
$ git config --global core.editor "vim"
</pre>
</p>
<p>
OK 這樣我們基本上就大致上設定完成了,可以開始使用 Git 了。
</p>
</section>
</article>
<hr>
Expand Down
6 changes: 4 additions & 2 deletions try.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
<article id="main">
<section id="try">
<div class="row">
<div class="span8" style="text-align:center;margin-left:23em">
Flash embeded
<div class="span9">
<object type="application/x-shockwave-flash" data="source/tut_normal.swf" width="800" height="400">
<param name="game" value="source/tut_normal.swf" />
</object>
</div>
</div>
</section>
Expand Down

0 comments on commit 8a81b9e

Please sign in to comment.