發表文章

目前顯示的是有「Git」標籤的文章

強迫 Git分支 Reset 到另一個分支的方法

git branch -f nimo master

[git] 解決igonre失效的問題

原因 失效有可能是因為之前有commit過,導至git把檔案加到快取中,所以清除快取就會正常了。 解法 git rm -r --cached . git add . git commit -m '.gitignore is now working'

Git small note

Git 是一個用來做版本控制的好工具。 參考 好麻煩部落格_Git教學 Git教學研究站 GitHub Help ihower { blogging } 鴨七-chitsaou 寫給大家的 Git 教學 $ man git Git名詞 檔案的三種狀態 已提交(committed):已被存(送)到repository中。 已修改(modified):已被修改但還沒存(送)到repository中。 改暫存(staged):檔案被暫時存放,下次commit的時候會被送出。 設定Git,(★config) $ git   config   --global   user .name   "SkyNimo"   #設定使用者名稱。 $ git   config   --global   user .email   "SkyNimo@gmail.com"   #設定使用者信箱。 $ git   config   --list   #列出你Git設定的內容。 #設定檔的位置在~/.gitconfit $ git   config   --global   apply .whitespace   nowarn   #忽略空白,有些語言會用到(Ruby)。 $ git   config   --global   color .ui   true   #輸出時加上顏色。 #--global 表示為全域設定  Git的別名(alias)功能,(★alias) $ git   config   --global   alias .cl   "config --list"   #這樣git config --list 就等於git cl了 $ $ git   cl   #執行看看 user .name = SkyNimo user .email = SkyNimo @gmail .com alias .cl = config   --list 建立資源庫(Repository),(★init) 找一個空的資料夾然後 $ git   init 複製(Clone)別人的Repository,(★Clone) $ git   clone   webUrl   #把目標網址的資源克隆(clone)下來 $ git   clon...