undo git reset

git reset soft HEAD~1 // undo last commit but keep the change

git reset hard HEAD~1 // undo last commit and discard the committed change

Undo the commit:

git reflog
3f6db14 HEAD@{0}: HEAD~: updating HEAD
d27924e HEAD@{1}: checkout: moving from d27924e0fe16776f0d0f1ee2933a0334a4787b4c
git reset HEAD@{1} (or git reset d27924e)

REF:

http://stackoverflow.com/questions/927358/how-do-you-undo-the-last-commit

http://stackoverflow.com/questions/2510276/undoing-git-reset

Advertisements

atop

atop -r y -b 18:00 -e 18:00

-r: read

-b: begin time

-e: end time

atop -r -b 18:00 // no need to specify time for today’s data

atop -r 20150624 -b 18:00 -e 08:00 // specify date for the file to look up

atop => show cpu, memory at a time in the past

vim setup

auto complete

” Autocomplete already-existing words in the file with tab (extremely useful!)
function InsertTabWrapper()
let col = col(‘.’) – 1
if !col || getline(‘.’)[col – 1] !~ ‘\k’
return “\<tab>”
else
return “\<c-p>”
endif
endfunction¬† “define a function
inoremap <tab> <c-r>=InsertTabWrapper()<cr> “define <tab><c-r> to trigger the function