diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-03-29 17:39:11 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-02 13:57:00 +0900 |
commit | 7968bef06b750fe9c59c1e1d0573bffc5b3cd94f (patch) | |
tree | 3c85aabdf72839cf3b414fe260aaca5540561add /Documentation/git-check-ignore.txt | |
parent | switch: reject "do nothing" case (diff) | |
download | tgif-7968bef06b750fe9c59c1e1d0573bffc5b3cd94f.tar.xz |
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 'Documentation/git-check-ignore.txt')
0 files changed, 0 insertions, 0 deletions