对比stage的文件
$ git diff --cached
修改最后一次提交
$ git commit --amend
取消上一次的提交(未push前)
$ git reset --soft HEAD^
| var color2code = { | |
| "aliceblue":"#F0F8FF", | |
| "antiquewhite":"#FAEBD7", | |
| "aqua":"#00FFFF", | |
| "aquamarine":"#7FFFD4", | |
| "azure":"#F0FFFF", | |
| "beige":"#F5F5DC", | |
| "bisque":"#FFE4C4", | |
| "black":"#000000", | |
| "blanchedalmond":"#FFEBCD", |
| function checkMobile(){ | |
| return (/ucweb|mobile|android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50 |
| keysym Pause = Insert Insert | |
| remove Lock = Caps_Lock |
| gnome-settings-daemon & | |
| gnome-volume-manager & | |
| gnome-power-manager & | |
| nm-applet & | |
| update-notifier & | |
| mongod --dbpath /var/lib/mongodb/ & | |
| exec awesome |
| autorun = true | |
| autorunApps = | |
| { | |
| "google-chrome", | |
| "LC_CTYPE=zh_CN.utf8 emacs", | |
| "empathy", | |
| terminal, | |
| } | |
| if autorun then | |
| for app = 1, #autorunApps do |
| [core] | |
| editor = vi | |
| [user] | |
| name = yourname | |
| email = youremail@gmail.com | |
| [alias] | |
| co = checkout | |
| st = status | |
| br = branch | |
| ci = commit |
| xterm*metaSendsEscape: true | |
| XTerm*fontMenu*fontdefault*Label: Default | |
| XTerm*faceName: Bitstream Vera Sans Mono Roman | |
| XTerm*faceNameDoublesize: WenQuanYi Bitmap Song | |
| XTerm*faceSize: 10 | |
| XTerm*cjkWidth: true | |
| XTerm*mkWidth: true | |
| XTerm*jumpScroll: true | |
| XTerm*SaveLines: 10000 |
| class ToHaml | |
| def initialize(path) | |
| @path = path | |
| end | |
| def convert! | |
| Dir["#{@path}/**/*.erb"].each do |file| | |
| `html2haml -rx #{file} #{file.gsub(/\.erb$/, '.haml')}` | |
| `rm #{file}` | |
| end |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <title>HTML template</title> | |
| <link href="http://blueprintcss.org/blueprint/screen.css" rel="stylesheet" type="text/css" /> | |
| <style type="text/css"> | |
| </style> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js" type="text/javascript"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js" type="text/javascript"></script> |