summaryrefslogtreecommitdiff
path: root/builtin/fmt-merge-msg.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-02-18 16:04:47 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-02-23 17:24:59 -0800
commit8e2dc6ac06ae90a00965e5c00aa4918dfd447639 (patch)
tree4416c20e19236c490a23045098dfa015163ab4d1 /builtin/fmt-merge-msg.c
parentGit 1.7.4 (diff)
downloadtgif-8e2dc6ac06ae90a00965e5c00aa4918dfd447639.tar.xz
commit: give final warning when reattaching HEAD to leave commits behind
You can detach the HEAD at an arbitrary commit in order to browse the files in various points in the history or build older versions of the software, without recording any new commit, and come back to an existing branch. When used in this "sightseer" mode, detached HEAD is a perfectly safe mechanism. It also is a useful state to experiment with throw-away commits. When coming back to an existing branch with "git checkout master", however, the commits that were created on the detached HEAD will become unreachable from anywhere but the reflog of the HEAD. Check if the commit we are about to leave is connected to some ref, and give a final warning otherwise to remind the user for safety. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fmt-merge-msg.c')
0 files changed, 0 insertions, 0 deletions