From: Jonas Fonseca <fonseca@diku•dk>
To: git@vger•kernel.org, Junio C Hamano <gitster@pobox•com>
Subject: [PATCH] Mention that git-branch -M can cause problems for tracking branches
Date: Fri, 2 Nov 2007 10:17:34 +0100 [thread overview]
Message-ID: <20071102091734.GC10141@diku.dk> (raw)
Signed-off-by: Jonas Fonseca <fonseca@diku•dk>
---
Documentation/git-branch.txt | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
I made a patch to discard the overwritten branch's configuration
section, which Spearce felt was too lossy a behaviour. However, since
it confused me, I think it should at least be mentioned in the manpage.
Maybe the warning message from git should also be added to improve its
"googlability".
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 5e81aa4..def4e85 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -165,6 +165,11 @@ If you are creating a branch that you want to immediately checkout, it's
easier to use the git checkout command with its `-b` option to create
a branch and check it out with a single command.
+When a branch is renamed so that it overwrites an existing branch unintended
+problems can arise. This is because git refuses to discard the configuration
+section of the overwritten branch. As a result git can become confused if, for
+example, the branches involved were used for tracking two different remote
+branches. The only way to fix this is to edit the configuration file manually.
Author
------
--
1.5.3.4.1481.g854da-dirty
--
Jonas Fonseca
next reply other threads:[~2007-11-02 9:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 9:17 Jonas Fonseca [this message]
2007-11-02 20:14 ` [PATCH] Mention that git-branch -M can cause problems for tracking branches Junio C Hamano
2007-11-02 22:04 ` Jonas Fonseca
2007-11-02 22:30 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071102091734.GC10141@diku.dk \
--to=fonseca@diku$(echo .)dk \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox