{{{ #!html
Git 修改
}}} [[PageOutline]] = 創建 repo = * 在 [https://github.com/repositories/new] 上新增一個 repo * 開啟一個專案 {{{ git config --global user.name "waue chen" git config --global user.email waue0920@gmail.com git init mkdir XXX cd XXX git init echo "hello world" > README git add README git commit -m 'first commit' git remote add origin git@github.com:waue0920/XXX.git git push -u origin master }}} = 維護 repo = * 修改存入stage {{{ git add }}} * 修改大量檔案 {{{ git add . }}} * commit提交 {{{ git commit -m "註解" }}} 另外也可以把git add與git commit用一個指令完成 {{{ git commit -a -m "註解" }}} git特別的一點是,他可以在本地端開啟並使用。上面這些用法完全不用伺服器,本機就可以執行。 本地端會有自己的repo,可以在飛機上,各種沒有網路的地方都可以順利使用並提交任何變更。 等您覺得修改好了,可以放上伺服器的時候,確保網路連線並輸入 * 本地 --> 伺服器 {{{ git push }}} * 伺服器 --> 本地 {{{ git pull }}} = fork 別人的專案 = 1. 到別人的專案上(ex:XXX) 點選 fork 2. 下載下來 {{{ git clone git@github.com:waue0920/XXX.git }}} = ref = [http://help.github.com/linux-set-up-git/] [http://billy3321.blogspot.com/2009/02/github-howto.html]