Githubpages2

Git版本管理

簡介

安裝

命令

GitHub

GoogleCode

TortoiseGit

訊息

相關網站

參考文獻

最新修改

簡體版

English

ccc@CCC-PC /d/Dropbox/Public/pmag/201308
$ cd /d

ccc@CCC-PC /d
$ ls
$RECYCLE.BIN     arduino-1.0.3  mathnode        test
201305           bak            msdia80.dll     treesaver
201305 - ??????  brother        my              ve
Blender          c              nand2tetris     video_output
CMake 2.8        ccc            nodejs          wikiMT
Copy             ccc101         nqu             wikidot
Documents        ccc101b        oc              ???????????????
Dropbox          ccc102         oc_collect      ????????????
FavoriteVideo    cccArduino     openbook        ????????????
HandyCam         cccbook        pandoc          ??????
IEET             chen_chu_chen  pmag            ??????
Install          ckh            ruby            ??????
LesMiserable     ckt            rubyinstaller   ???????????????
OpenCV           code           shell           ??????????????? (2)
OpenComputer     cs             software        ????????????     ????????????
R                fanny          sphinx          ??????
RecordPen        ghpagetest     spice           ?????????
ScreenVideo      git            student         ????????????
SketsaSvgEditor  hank           svg-edit-2.5.1  ??????
VerilogCPU       js             tax
Xtras            kevin          teachvideo
amath            kinmen         temp

ccc@CCC-PC /d
$ cd git

ccc@CCC-PC /d/git
$ ls
HtmlServer           NoteServer_v0.2.zip  mathnode         node_modules
HtmlServer.zip       WebServer            mathnode_v1.zip  wikinode
NoteServer           WebServer.zip        mathnode_v2.zip
NoteServer_v0.1.zip  jstat                mathnode_v3.zip

ccc@CCC-PC /d/git
$ git clone https://github.com/programmermagazine/201308.git
Cloning into '201308'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.

ccc@CCC-PC /d/git
$ ls
201308          NoteServer_v0.1.zip  jstat            mathnode_v3.zip
HtmlServer      NoteServer_v0.2.zip  mathnode         node_modules
HtmlServer.zip  WebServer            mathnode_v1.zip  wikinode
NoteServer      WebServer.zip        mathnode_v2.zip

ccc@CCC-PC /d/git
$ git checkout --orphan gh-pages
fatal: Not a git repository (or any of the parent directories): .git

ccc@CCC-PC /d/git
$ cd 201308

ccc@CCC-PC /d/git/201308 (master)
$ ls
README.md

ccc@CCC-PC /d/git/201308 (master)
$ git checkout --orphan gh-pages
Switched to a new branch 'gh-pages'

ccc@CCC-PC /d/git/201308 (gh-pages)
$ git rm -rf .
rm 'README.md'

ccc@CCC-PC /d/git/201308 (gh-pages)
$ git add -A
warning: LF will be replaced by CRLF in css/pmag.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/footer.htm.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/home.md.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/md0.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/README.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/gfuntype.c.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/gifsave.c.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/mimetex.c.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/mimetex.h.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/mimetex.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/texfonts.h.
The file will have its original line endings in your working directory.

ccc@CCC-PC /d/git/201308 (gh-pages)
$ git commit -a -m "commit1"
[gh-pages (root-commit) 7a95459] commit1
warning: LF will be replaced by CRLF in css/pmag.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/footer.htm.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/home.md.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/md0.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/README.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/gfuntype.c.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/gifsave.c.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/mimetex.c.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/mimetex.h.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/mimetex.html.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in source/mimetex/texfonts.h.
The file will have its original line endings in your working directory.
 93 files changed, 121684 insertions(+)
 create mode 100644 code/big5asUtf8.htm
 create mode 100644 code/cipher.c
 create mode 100644 code/cipher1.c
 create mode 100644 code/cipher2.c
 create mode 100644 css/pmag.css
 create mode 100644 htm/article1.html
 create mode 100644 htm/article3.html
 create mode 100644 htm/article4.html
 create mode 100644 htm/article5.html
 create mode 100644 htm/discuss1.html
 create mode 100644 htm/message1.html
 create mode 100644 htm/people1.html
 create mode 100644 htm/science1.html
 create mode 100644 htm/video1.html
 create mode 100644 img/2013-06-28 13_27_08-.png
 create mode 100644 img/220px-Joel_spolsky_on_20_sept_2007.jpg
 create mode 100644 img/AngularJS-large.png
 create mode 100644 img/Arduino_LightResister.png
 create mode 100644 img/Arduino_LightResister_board1.png
 create mode 100644 img/Arduino_LightResister_circuit1.png
 create mode 100644 img/Arduino_LightResister_screen1.png
 create mode 100644 img/Big5asUTF8.jpg
 create mode 100644 img/QuantumComputer.png
 create mode 100644 img/ScienceExperiment.png
 create mode 100644 img/ScienceIndustry.png
 create mode 100644 img/cover.jpg
 create mode 100644 img/coverA4.png
 create mode 100644 img/eliza_talkto.png
 create mode 100644 img/ewave_screen1.jpg
 create mode 100644 img/ewave_screen10.jpg
 create mode 100644 img/ewave_screen11.jpg
 create mode 100644 img/ewave_screen12.jpg
 create mode 100644 img/ewave_screen13.jpg
 create mode 100644 img/ewave_screen14.jpg
 create mode 100644 img/ewave_screen15.jpg
 create mode 100644 img/ewave_screen16.jpg
 create mode 100644 img/ewave_screen17.jpg
 create mode 100644 img/ewave_screen18.jpg
 create mode 100644 img/ewave_screen19.jpg
 create mode 100644 img/ewave_screen2.jpg
 create mode 100644 img/ewave_screen20.jpg
 create mode 100644 img/ewave_screen21.jpg
 create mode 100644 img/ewave_screen3.jpg
 create mode 100644 img/ewave_screen4.jpg
 create mode 100644 img/ewave_screen5.jpg
 create mode 100644 img/ewave_screen6.jpg
 create mode 100644 img/ewave_screen7.jpg
 create mode 100644 img/ewave_screen8.jpg
 create mode 100644 img/ewave_screen9.jpg
 create mode 100644 img/git-collaborator.png
 create mode 100644 img/x86_book.JPG
 create mode 100644 source/Makefile
 create mode 100644 source/article.md
 create mode 100644 source/article1.md
 create mode 100644 source/article2.md
 create mode 100644 source/article3.md
 create mode 100644 source/article4.md
 create mode 100644 source/article5.md
 create mode 100644 source/article6.md
 create mode 100644 source/convert.exe
 create mode 100644 source/discuss.md
 create mode 100644 source/discuss1.md
 create mode 100644 source/discuss2.md
 create mode 100644 source/discuss3.md
 create mode 100644 source/footer.htm
 create mode 100644 source/header.htm
 create mode 100644 source/home.md
 create mode 100644 source/info.md
 create mode 100644 source/license.md
 create mode 100644 source/md0.js
 create mode 100644 source/message.md
 create mode 100644 source/message1.md
 create mode 100644 source/message4.md
 create mode 100644 source/metadata.xml
 create mode 100644 source/mimetex.exe
 create mode 100644 source/mimetex/README
 create mode 100644 source/mimetex/build.bat
 create mode 100644 source/mimetex/gfuntype.c
 create mode 100644 source/mimetex/gifsave.c
 create mode 100644 source/mimetex/mimetex.c
 create mode 100644 source/mimetex/mimetex.exe
 create mode 100644 source/mimetex/mimetex.h
 create mode 100644 source/mimetex/mimetex.html
 create mode 100644 source/mimetex/mimetex.zip
 create mode 100644 source/mimetex/texfonts.h
 create mode 100644 "source/mimetex/\346\226\260\345\242\236\346\226\207\345\255
\227\346\226\207\344\273\266.txt"
 create mode 100644 source/pdffooter.htm
 create mode 100644 source/people.md
 create mode 100644 source/people1.md
 create mode 100644 source/reflink.md9
 create mode 100644 source/science1.md
 create mode 100644 source/tex2img.bat
 create mode 100644 source/video.md
 create mode 100644 source/video1.md
 create mode 100644 "submit/\351\233\273\345\243\223\347\264\213\346\263\242\350
\210\207\347\243\201\347\217\240.odt"

ccc@CCC-PC /d/git/201308 (gh-pages)
$ git config --global user.email "ccckmit@gmail.com"

ccc@CCC-PC /d/git/201308 (gh-pages)
$ git config --global user.name "ccckmit"

ccc@CCC-PC /d/git/201308 (gh-pages)
$ git push origin gh-pages
Username for 'https://github.com': ccckmit
Password for 'https://ccckmit@github.com':
Counting objects: 101, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (92/92), done.
Writing objects: 100% (101/101), 7.11 MiB | 10 KiB/s, done.
Total 101 (delta 1), reused 0 (delta 0)
To https://github.com/programmermagazine/201308.git
 * [new branch]      gh-pages -> gh-pages

ccc@CCC-PC /d/git/201308 (gh-pages)
$

然後用 http://帳號.github.io/分支名稱/檔案名稱 就可以看到了。

http://programmermagazine.github.io/201308/htm/home.html

版本修改

$ git checkout --orphan gh-pages
fatal: A branch named 'gh-pages' already exists.

ccc@CCC-PC /d/git/201308 (gh-pages)
$ ls
book  code  css  htm  img  source  submit  timg

ccc@CCC-PC /d/git/201308 (gh-pages)
$ cd htm

ccc@CCC-PC /d/git/201308/htm (gh-pages)
$ ls
article.html   article4.html  home.html     message1.html  video.html
article1.html  article5.html  info.html     people.html    video1.html
article2.html  discuss.html   license.html  people1.html
article3.html  discuss1.html  message.html  science1.html

ccc@CCC-PC /d/git/201308/htm (gh-pages)
$ cd ..

ccc@CCC-PC /d/git/201308 (gh-pages)
$ git add -A

ccc@CCC-PC /d/git/201308 (gh-pages)
$ git commit -a -m "commit3"
[gh-pages f34704e] commit3
 18 files changed, 1700 insertions(+)
 create mode 100644 htm/article.html
 create mode 100644 htm/article1.html
 create mode 100644 htm/article2.html
 create mode 100644 htm/article3.html
 create mode 100644 htm/article4.html
 create mode 100644 htm/article5.html
 create mode 100644 htm/discuss.html
 create mode 100644 htm/discuss1.html
 create mode 100644 htm/home.html
 create mode 100644 htm/info.html
 create mode 100644 htm/license.html
 create mode 100644 htm/message.html
 create mode 100644 htm/message1.html
 create mode 100644 htm/people.html
 create mode 100644 htm/people1.html
 create mode 100644 htm/science1.html
 create mode 100644 htm/video.html
 create mode 100644 htm/video1.html

ccc@CCC-PC /d/git/201308 (gh-pages)
$ git push origin gh-pages
Username for 'https://github.com': ccckmit
Password for 'https://ccckmit@github.com':
Counting objects: 22, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (21/21), 50.83 KiB, done.
Total 21 (delta 6), reused 0 (delta 0)
To https://github.com/programmermagazine/201308.git
   63e9a27..f34704e  gh-pages -> gh-pages

ccc@CCC-PC /d/git/201308 (gh-pages)
$

Facebook

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License