Posts

Showing posts from July, 2017

How to undo Git commits ?

You'll need to "reset" the last commit by running the following git command git reset HEAD~ If you wish to undo more that one git commit, add the number of commits to be undone after the tilda, for example: git reset HEAD~3 git reset undo your commits and leaves your, previously committed files, in an unstaged state. If you would like to leave the uncommitted files in a staged state, add the parameter --soft to the reset command, for example: git reset --soft HEAD~2 From here, you can proceed with updating\committing your files.

Taming VI on Ubuntu

Install V IM proved sudo apt-get install vim Create\edit ~/.vimrc to have the following lines set nocompatible set backspace=2