Skip to content

Commit 6ec5f46

Browse files
phil-blaingitster
authored andcommitted
revisions.txt: document more special refs
Some special refs, namely HEAD, FETCH_HEAD, ORIG_HEAD, MERGE_HEAD and CHERRY_PICK_HEAD, are mentioned and described in 'gitrevisions', but some others, namely REBASE_HEAD, REVERT_HEAD, and BISECT_HEAD, are not. Add a small description of these special refs. Signed-off-by: Philippe Blain <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bc11bac commit 6ec5f46

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Documentation/revisions.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ characters and to avoid word splitting.
3232
first match in the following rules:
3333
+
3434
. If '$GIT_DIR/<refname>' exists, that is what you mean (this is usually
35-
useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD`, `MERGE_HEAD`
36-
and `CHERRY_PICK_HEAD`);
35+
useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD`, `MERGE_HEAD`,
36+
`REBASE_HEAD`, `REVERT_HEAD`, `CHERRY_PICK_HEAD` and `BISECT_HEAD`);
3737

3838
. otherwise, 'refs/<refname>' if it exists;
3939

@@ -59,9 +59,18 @@ characters and to avoid word splitting.
5959
`MERGE_HEAD`:::
6060
records the commit(s) which you are merging into your branch when you
6161
run `git merge`.
62+
`REBASE_HEAD`:::
63+
during a rebase, records the commit at which the operation is
64+
currently stopped, either because of conflicts or an `edit` command in
65+
an interactive rebase.
66+
`REVERT_HEAD`:::
67+
records the commit which you are reverting when you run `git revert`.
6268
`CHERRY_PICK_HEAD`:::
6369
records the commit which you are cherry-picking when you run `git
6470
cherry-pick`.
71+
`BISECT_HEAD`:::
72+
records the current commit to be tested when you run `git bisect
73+
--no-checkout`.
6574

6675
+
6776
Note that any of the 'refs/*' cases above may come either from

0 commit comments

Comments
 (0)