Therefore, for a quick excurse to the past of the master branch:
$ cg-seek git-pasky-0.1 $ cg-diff this master # will do the correct thing $ cg-seek # will restore what we had beforeFor intuitiveness, specifying the branch name (cg-seek master) will do the right thing too. If you want to migrate your working tree to another branch, use cg-clone(1) to create a new tree for the new branch, or cg-switch(1) to also change your current tree to use the new branch.
Note that during the time you are seeked out, commits, merges, and some other operations are blocked, since the next cg-seek(1) or cg-reset(1) invocation will happily wipe out their products silently. You can override this in the cg-commit(1) command by passing it a -f parameter - this can be useful e.g. when you seeked to a commit which cannot be compiled and you want to commit a compilation fix, as long as you are aware that the commit of the fix will be rendered unreachable (you will be able to get back to it only if you remember its ID) at the moment you do next seek or a reset. If you want to save the commit, you can save it to a separate branch using cg-switch -n.
Takes the target commit ID to seek to as an argument.
$ cg-switch -f -r COMMIT_ID CURRENT_HEAD_NAMENote that this command has some serious caveats! Please read the cg-switch(1) documentation for details.