Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Ericsson
Date: Thursday, October 25, 2007 - 10:05 am

Theodore Tso wrote:

Yes. The few topic-branches that require input from several people are
distributed this way for peer review and trouble-shooting. It's nifty
if they're automatically downloaded, but not so much of an issue that
it matters.



No, they're just surprised that what they thought would be automatic
isn't, and the curse about it when they put themselves in trouble by
forgetting about it. I've done it myself, and I've been using git since
may 2005.


It depends. For small bugfixes we sometimes commit directly on the
checked out branch. For larger issues we usually create a topic branch
and hack away, creating nicely ordered patch-series and such, but those
topic branches must be created from the tip of the upstream tracking
branch. What Dscho suggested would definitely work, but that would
mean I'd have to tell my co-workers to use 'git branch -D', which I'm
quite reluctant to do. One solution to that particular problem is
ofcourse to hack the delete-command of git-branch to honor remote
tracking branches when calculating dependencies, so the local branches
can safely be removed when they're done with them.

However, there's still this issue:
$ git checkout -b foo origin/pu
Branch foo set up to track remote branch refs/remotes/origin/pu.
Switched to a new branch "foo"

git checkout will say that every time a branch is created from a
tracking branch, unless one tells it --no-track (which people don't
learn about unless they're really into git), so it's quite natural
that people think git will actually make sure, within reasonable
limits, that 'foo' is kept in sync with refs/remotes/origin/pu.
That's not the case, however.

So we could either change the message to be:
"Branch foo set up to track remote branch refs/remotes/origin/pu,
provided you only ever issue git-pull while having branch foo
checked out."

Or we could make 'git checkout -b' default to --no-track, perhaps
giving annoying messages everytime someone "git-checkout -b"'s a
remote tracking branch.
Or we could make git-pull keep git checkout's promises.

I'm opting for the latter, since that's the one that makes a piece
of machinery do some work for me. I'd happily call the command
"git-update-all-local-branches-tracking-remote-tracking-branches"
and only ever make it actually do any work if I pass it the option
"--I-bask-in-the-glory-of-local-vs-remote-confusion", but I need
some sort of solution that
a) Doesn't normally present error messages.
b) Doesn't involve routinely using "git branch -D"
c) Doesn't require more than one or two commands per repo to get
the locally checked out copies of the remote tracking branches
(the ones git has "set up to track remote branch remotes/x/branch")
up to date with their remote counterpart.



Or invent the sensatronic transmission system and get the best of both
worlds. Engineering solutions so they fit humans? Good gods, that's a
novel idea! ;-)


It's not so much CVS-damaged developers as it's conflicting messages.
I'm quite confused about it myself at times, but for me there's
nobody to harrass since I was the one vetoing in git as the scm to
use for all our corporate needs.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Git User's Survey 2007 unfinished summary continued, Jakub Narebski, (Mon Oct 8, 1:55 pm)
Git User's Survey 2007 unfinished summary continued, Jakub Narebski, (Fri Oct 12, 3:08 pm)
Re: Git User's Survey 2007 unfinished summary continued, Frank Lichtenheld, (Fri Oct 12, 4:36 pm)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Fri Oct 12, 5:46 pm)
Re: Git User's Survey 2007 unfinished summary continued, J. Bruce Fields, (Fri Oct 12, 7:13 pm)
Re: Git User's Survey 2007 unfinished summary continued, Shawn O. Pearce, (Fri Oct 12, 7:53 pm)
Re: Git User's Survey 2007 unfinished summary continued, Shawn O. Pearce, (Fri Oct 12, 8:04 pm)
Re: Git User's Survey 2007 unfinished summary continued, Frank Lichtenheld, (Sat Oct 13, 5:58 am)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Sat Oct 13, 6:04 am)
Re: Git User's Survey 2007 unfinished summary continued, Andreas Ericsson, (Sat Oct 13, 11:00 am)
Re: Git User's Survey 2007 unfinished summary continued, David Kastrup, (Sat Oct 13, 12:59 pm)
Re: Git User's Survey 2007 unfinished summary continued, J. Bruce Fields, (Sat Oct 13, 1:27 pm)
Re: Git User's Survey 2007 unfinished summary continued, David Kastrup, (Sat Oct 13, 1:57 pm)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Sat Oct 13, 5:36 pm)
Re: Git User's Survey 2007 unfinished summary continued, Linus Torvalds, (Sat Oct 13, 6:13 pm)
Re: Git User's Survey 2007 unfinished summary continued, Shawn O. Pearce, (Sat Oct 13, 6:44 pm)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Sat Oct 13, 7:06 pm)
Re: Git User's Survey 2007 unfinished summary continued, Linus Torvalds, (Sat Oct 13, 8:15 pm)
Re: Git User's Survey 2007 unfinished summary continued, Linus Torvalds, (Sat Oct 13, 8:55 pm)
Re: Git User's Survey 2007 unfinished summary continued, Andreas Ericsson, (Sun Oct 14, 1:45 am)
Re: Git User's Survey 2007 unfinished summary continued, David Kastrup, (Sun Oct 14, 2:21 am)
Re: Git User's Survey 2007 unfinished summary continued, Steven Grimm, (Sun Oct 14, 11:12 am)
Re: Git User's Survey 2007 unfinished summary continued, J. Bruce Fields, (Sun Oct 14, 11:40 am)
Re: Git User's Survey 2007 unfinished summary continued, Steven Grimm, (Sun Oct 14, 12:25 pm)
Re: Git User's Survey 2007 unfinished summary continued, Nicolas Pitre, (Sun Oct 14, 12:44 pm)
Re: Git User's Survey 2007 unfinished summary continued, Andreas Ericsson, (Sun Oct 14, 12:50 pm)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Sun Oct 14, 1:18 pm)
Re: Git User's Survey 2007 unfinished summary continued, Andreas Ericsson, (Sun Oct 14, 1:22 pm)
Re: Git User's Survey 2007 unfinished summary continued, J. Bruce Fields, (Sun Oct 14, 1:24 pm)
Re: Git User's Survey 2007 unfinished summary continued, Jakub Narebski, (Sun Oct 14, 2:49 pm)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Sun Oct 14, 3:08 pm)
Re: Git User's Survey 2007 unfinished summary continued, David Kastrup, (Sun Oct 14, 3:12 pm)
Re: Git User's Survey 2007 unfinished summary continued, Jakub Narebski, (Sun Oct 14, 3:15 pm)
Re: Git User's Survey 2007 unfinished summary continued, David Kastrup, (Sun Oct 14, 3:17 pm)
Re: Git User's Survey 2007 unfinished summary continued, Matthew Andrews, (Sun Oct 14, 3:23 pm)
Re: Git User's Survey 2007 unfinished summary continued, David Kastrup, (Sun Oct 14, 3:30 pm)
Re: Git User's Survey 2007 unfinished summary continued, Shawn O. Pearce, (Mon Oct 15, 4:20 pm)
Re: Git User's Survey 2007 unfinished summary continued, Nicolas Pitre, (Mon Oct 15, 7:48 pm)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Tue Oct 16, 3:51 am)
Re: Git User's Survey 2007 unfinished summary continued, Federico Mena Quintero, (Fri Oct 19, 1:57 pm)
Re: Git User's Survey 2007 unfinished summary continued, Jakub Narebski, (Fri Oct 19, 4:27 pm)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Fri Oct 19, 4:37 pm)
Re: Git User's Survey 2007 unfinished summary continued, Andreas Ericsson, (Sat Oct 20, 1:03 am)
Re: Git User's Survey 2007 unfinished summary continued, Steffen Prohaska, (Sat Oct 20, 3:19 am)
Re: Git User's Survey 2007 unfinished summary continued, Andreas Ericsson, (Sat Oct 20, 4:29 am)
Re: Git User's Survey 2007 unfinished summary continued, Jakub Narebski, (Sat Oct 20, 4:06 pm)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Sat Oct 20, 4:33 pm)
Re: Git User's Survey 2007 unfinished summary continued, Dmitry Potapov, (Sat Oct 20, 11:08 pm)
Re: Git User's Survey 2007 unfinished summary continued, Andreas Ericsson, (Sun Oct 21, 12:17 am)
Re: Git User's Survey 2007 unfinished summary continued, J. Bruce Fields, (Sun Oct 21, 3:12 pm)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Sun Oct 21, 3:15 pm)
Re: Git User's Survey 2007 unfinished summary continued, Andreas Ericsson, (Mon Oct 22, 12:59 am)
best git practices, was Re: Git User's Survey 2007 unfinis ..., Johannes Schindelin, (Mon Oct 22, 4:04 am)
Re: Git User's Survey 2007 unfinished summary continued, Jakub Narebski, (Mon Oct 22, 5:26 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Nguyen Thai Ngoc Duy, (Mon Oct 22, 6:36 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Mon Oct 22, 6:38 am)
Re: Git User's Survey 2007 unfinished summary continued, Johannes Schindelin, (Mon Oct 22, 6:45 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Mon Oct 22, 6:48 am)
Re: Git User's Survey 2007 unfinished summary continued, Federico Mena Quintero, (Mon Oct 22, 7:28 am)
Re: Git User's Survey 2007 unfinished summary continued, Andreas Ericsson, (Mon Oct 22, 7:29 am)
Re: Git User's Survey 2007 unfinished summary continued, Federico Mena Quintero, (Mon Oct 22, 7:53 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Mon Oct 22, 8:00 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Federico Mena Quintero, (Mon Oct 22, 8:24 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Federico Mena Quintero, (Mon Oct 22, 12:36 pm)
Re: Git User's Survey 2007 unfinished summary continued, Steven Grimm, (Mon Oct 22, 3:53 pm)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Mon Oct 22, 4:21 pm)
Re: Git User's Survey 2007 unfinished summary continued, Jakub Narebski, (Mon Oct 22, 4:27 pm)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Steffen Prohaska, (Mon Oct 22, 10:38 pm)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Andreas Ericsson, (Tue Oct 23, 12:24 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Tue Oct 23, 3:58 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Steffen Prohaska, (Wed Oct 24, 11:48 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Andreas Ericsson, (Wed Oct 24, 12:41 pm)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Wed Oct 24, 3:14 pm)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Wed Oct 24, 3:17 pm)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Wed Oct 24, 4:28 pm)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Steffen Prohaska, (Wed Oct 24, 11:02 pm)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Andreas Ericsson, (Thu Oct 25, 12:15 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Andreas Ericsson, (Thu Oct 25, 12:42 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Andreas Ericsson, (Thu Oct 25, 12:57 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Thu Oct 25, 3:07 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Thu Oct 25, 3:12 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Thu Oct 25, 3:17 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Thu Oct 25, 3:27 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Thu Oct 25, 4:39 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Johannes Schindelin, (Thu Oct 25, 5:58 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Federico Mena Quintero, (Thu Oct 25, 9:06 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Federico Mena Quintero, (Thu Oct 25, 9:16 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Andreas Ericsson, (Thu Oct 25, 10:05 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Andreas Ericsson, (Thu Oct 25, 10:10 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Federico Mena Quintero, (Thu Oct 25, 11:02 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Federico Mena Quintero, (Thu Oct 25, 11:06 am)
[PATCH] Make rebase smarter, Steven Walter, (Thu Oct 25, 9:41 pm)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Steffen Prohaska, (Thu Oct 25, 11:18 pm)
Re: [PATCH] Make rebase smarter, Andreas Ericsson, (Fri Oct 26, 12:42 am)
Re: best git practices, was Re: Git User's Survey 2007 unf ..., Andreas Ericsson, (Fri Oct 26, 12:53 am)
Re: [PATCH] Make rebase smarter, Johannes Schindelin, (Fri Oct 26, 2:57 am)