diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-03-29 10:39:11 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-02 04:57:00 (GMT) |
commit | 7968bef06b750fe9c59c1e1d0573bffc5b3cd94f (patch) | |
tree | 3c85aabdf72839cf3b414fe260aaca5540561add /symlinks.c | |
parent | e342c63a4e070bd1398b9aa86ac4ce917edbadc7 (diff) | |
download | git-7968bef06b750fe9c59c1e1d0573bffc5b3cd94f.zip git-7968bef06b750fe9c59c1e1d0573bffc5b3cd94f.tar.gz git-7968bef06b750fe9c59c1e1d0573bffc5b3cd94f.tar.bz2 |
switch: only allow explicit detached HEAD
"git checkout <commit>" will checkout the commit in question and
detach HEAD from the current branch. It is naturally a right thing to
do once you get git references. But detached HEAD is a scary concept
to new users because we show a lot of warnings and stuff, and it could
be hard to get out of (until you know better).
To keep switch a bit more friendly to new users, we only allow
entering detached HEAD mode when --detach is given. "git
switch" must take a branch (unless you create a new branch,
then of course switch can take any commit-ish)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'symlinks.c')
0 files changed, 0 insertions, 0 deletions