Git - Diff 的小技巧,只比較特定檔案 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 11月 27, 2014 一般來說,git-diff 會把所有追蹤中的檔案差異顯示出來,如果我們只要顯示 *.c 副檔名的檔案差異呢? $: git diff --name-only <branch> -- '*.c' 如此一來,就會限制輸出C檔案的差異!其中 --name-only 是為了突顯出有哪些檔案有差異,而查看差異內容。 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 留言
Windows 上使用 Meld 進行 git-diff 5月 24, 2015 [Git Bash] git config --global difftool.meld git config --global difftool.meld.path "C:\Program Files (x86)\Meld\Meld.exe" 閱讀完整內容
用 Javascript 判斷使用者瀏覽網頁是用 Smartphone, Tablet or Desktop 1月 19, 2015 在網頁上貼上以下 <script type='text/javascript' src="//wurfl.io/wurfl.js"></script> 然後你可以使用 console.log(WURFL); 從瀏覽器的除錯Console印出現在瀏覽的裝置資訊 要判斷瀏覽器是否為移動裝置可以直接使用 if(WURFL.is_mobile){ //dostuff(); } 只不過這將會把 Tablet, Smartphone 都算在 mobile 裡面 如果要區分是否的更詳細可以使用以下的判斷 if(WURFL.form_factor == "Tablet"){ //dostuff(); } 而 form_factor 包含了以下幾種 Desktop App Tablet Smartphone Feature Phone Smart-TV Robot Other non-Mobile Other Mobile 閱讀完整內容
如何更改 Git config 的編輯器 12月 05, 2014 執行 git config -e ,預設是打開 GNU Nano 編輯器,不過操作上不太順手,可以更改設定,改為自己喜歡的編輯器: $: git config core.editor <editor name> 編輯器可以是任意的,環境變數中找得到的,如果沒有就要自己加進去。 閱讀完整內容
留言
張貼留言