Showing posts with label Version Control. Show all posts
Showing posts with label Version Control. Show all posts

Wednesday, 7 November 2012

Git Stash

Sometimes you want to just mess around with some code, maybe write some data buffers to a file to examine or whatever else. This leaves the code in a messy state and whenever you want to switch to a different branch you don't want to commit this code but you also don't want to leave your working directory dirty. For this I am loving Git Stash: Just go to a bash prompt (This is very nice and easy from Git Extensions):

The code must be tracked, if not already then simply:

git add .
Save:
git stash save "MyStash"
Coming back to it later:
git stash list
git stash apply stash@{0}
Find your stash with the list command, that will give you the stash number. Then apply Undoing the stash:
git stash show -p | git apply --reverse

Friday, 13 May 2011

TortoiseHg 2.0.4 and mercurial 1.8.3

I just installed the new version of tortoise and mercurial (coming from version 1). I’m keen to explore the new features, but the first thing I noticed is that hgtk.exe no longer exist.

 

So my automated scripts for checking in were breaking. Upon inspection it seems that this was replaced by thg.exe

 

luckily the hg command seems unchanged and still outputs the same text (so that still works).

 

The thg.exe command seems to still behave the same:

 

thg commit

thg log

thg update.

 

And there is a brand new GUI that looks a lot more awesome with cool code completion etc, , check it out:

 

http://tortoisehg.bitbucket.org/download/index.html

 

image