cg-seek

Langue: en

Version: 02/24/2009 (fedora - 04/07/09)

Section: 1 (Commandes utilisateur)

NAME

cg-seek - seek the working tree to a given commit

SYNOPSIS

cg-seek [COMMIT_ID]

DESCRIPTION

Seeking will bring the working tree from its current HEAD to a given commit. Note that it changes just the HEAD of the working tree, not the branch it is corresponding to. It will return to the HEAD of the appropriate branch if passed no arguments.

Therefore, for a quick excursion 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 before
 

For 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 gitm[blue]1m[][1] to create a new tree for the new branch, or gitm[blue]1m[][2] 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 gitm[blue]1m[][3] or gitm[blue]1m[][4] invocation will happily wipe out their products silently. You can override this in the gitm[blue]1m[][5] 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.

OPTIONS

-h, --help

Print usage summary.

--long-help

Print user manual. The same as found in gitm[blue]1m[][3].

NOTES

The gitm[blue]1m[][3] command is meant only for temporary excursions to the commit history. If you want to permanently switch your branch to a different commit id (forgetting its current contents), you can use the gitm[blue]1m[][2] command:

 $ cg-switch -f -r COMMIT_ID CURRENT_HEAD_NAME
 

Note that this command has some serious caveats! Please read the gitm[blue]1m[][2] documentation for details.

Copyright © Petr Baudis, 2005

SEE ALSO

cg-seek is part of gitm[blue]7m[][6], a toolkit for managing gitm[blue]7m[][7] trees.

NOTES

1.
1
[set $man.base.url.for.relative.links]/cg-clone
2.
1
[set $man.base.url.for.relative.links]/cg-switch
3.
1
[set $man.base.url.for.relative.links]/cg-seek
4.
1
[set $man.base.url.for.relative.links]/cg-reset
5.
1
[set $man.base.url.for.relative.links]/cg-commit
6.
7
[set $man.base.url.for.relative.links]/cogito
7.
7
[set $man.base.url.for.relative.links]/git