1CG-SEEK(1) CG-SEEK(1)
2
3
4
6 cg-seek - seek the working tree to a given commit
7
9 cg-seek [COMMIT_ID]
10
11
13 Seeking will bring the working tree from its current HEAD to a given
14 commit. Note that it changes just the HEAD of the working tree, not the
15 branch it is corresponding to. It will return to the HEAD of the
16 appropriate branch if passed no arguments.
17
18 Therefore, for a quick excursion to the past of the master branch:
19
20
21 $ cg-seek git-pasky-0.1
22 $ cg-diff this master # will do the correct thing
23 $ cg-seek # will restore what we had before
24 For intuitiveness, specifying the branch name (cg-seek master) will do
25 the right thing too. If you want to migrate your working tree to
26 _another_ branch, use cg-clone(1) to create a new tree for the new
27 branch, or cg-switch(1) to also change your current tree to use the new
28 branch.
29
30 Note that during the time you are seeked out, commits, merges, and some
31 other operations are blocked, since the next cg-seek(1) or cg-reset(1)
32 invocation will happily wipe out their products silently. You can
33 override this in the cg-commit(1) command by passing it a -f parameter
34 - this can be useful e.g. when you seeked to a commit which cannot be
35 compiled and you want to commit a compilation fix, as long as you are
36 aware that the commit of the fix will be rendered unreachable (you will
37 be able to get back to it only if you remember its ID) at the moment
38 you do next seek or a reset. If you want to save the commit, you can
39 save it to a separate branch using cg-switch -n.
40
41 Takes the target commit ID to seek to as an argument.
42
43
45 -h, --help
46 Print usage summary.
47
48 --long-help
49 Print user manual. The same as found in cg-seek(1).
50
52 The cg-seek(1) command is meant only for temporary excursions to the
53 commit history. If you want to permanently switch your branch to a
54 different commit id (forgetting its current contents), you can use the
55 cg-switch(1) command:
56
57
58 $ cg-switch -f -r COMMIT_ID CURRENT_HEAD_NAME
59 Note that this command has some serious caveats! Please read the
60 cg-switch(1) documentation for details.
61
62
64 Copyright © Petr Baudis, 2005
65
66
68 cg-seek is part of cogito(7), a toolkit for managing git(7) trees.
69
70
71
72
73 12/11/2006 CG-SEEK(1)