Friday, 2 August 2013

Git Reset Head using Refflog

Refflog is used to reset your HEAD after you had HARD RESET HEAD.

$ install reflog
$ git reflog
$ git reset --hard 4993de0 #(give the HEAD number on which you want to go back)

Useful Links:

Setting up Git to use Diffmerge

Diffmerge is used to manage your merge conflicts cleanly. first you need to download and install Diffmerge. For further configuration
http://adventuresincoding.com/2010/04/how-to-setup-git-to-use-diffmerge/

Restore a postgres database dump

If you want to restore your postgres database from a dump. first cd into the directory where your dump file exist.
Then run the following command in your console.

$ psql -U mypostgresusername -d mydestinationdbname -f mydbdumpfilename.sql