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: Steffen Prohaska
Date: Wednesday, October 24, 2007 - 11:02 pm

On Oct 25, 2007, at 1:28 AM, Johannes Schindelin wrote:


Ok, there is not a fundamental difference between local branches
that automatically merge from remotes and local branches that
are purely local and _never_ merge anything automatically. Both
are only local branches.

But these two types of branches already behave differently when
I call "git pull". There is already some kind of "illusion"
that some local branches are more tightly connected to remote
branches than others.

"git pull" could help to make the illusion even better. The
illusion would be better if it was easier to keep the heads
of the local branches near to the heads of branches they
automatically merge from, as long as this is easily possible.



You're right. You can rebase your local changes on top of the new
shared remote head. And this is probably the best thing you can do
to get a clean history. Maybe it should be easier.

So, do I understand correctly, what you propose is:
- never merge but only rebase
- Due to lacking support for this in "git pull", never use
   git pull when working with shared branches but instead _always_ use
   "git fetch; git rebase origin/<branch_I'm_on>".

So you say that one of the first messages in "git for CVS users",
"The equivalent of cvs update is git pull origin" [1], is wrong.
I don't think I'm able to sell your proposed workflow with the current
documentation. But maybe I try if I'm absolutely convinced that it
is superior.

[1] http://www.kernel.org/pub/software/scm/git/docs/cvs-migration.html



Well if you have several local branches checked out that are
shared with others you run into the "git push" problem again ...
(see below at git push origin master).



Isn't this a bit dangerous? It forces to overwrite master
no matter what's on it. You don't see diffstats nor a fast
forward message that confirms what you're doing.



I'd like to see "git push" here. But to make this work without
error you'd need to _delete_ master after you pushed. Otherwise
it could happen that you later work on a different shared
branch and "git push" would complain about master. "git push"
would recommend to do a "git pull" and we're back where the
discussion started.

Or do you propose to delete master at this point? That is do
you propose to _never_ have remote branches checked out locally.
Except for a very short period when you do

     git branch -m <shared_branch>
     git push origin <shared_branch>
     git checkout do-not-work-here
     git branch -D <shared_branch>



But it already happens now. "git pull" sometimes merges a
remote branch (--track) and sometimes it reports an error that
is fails to do so (--no-track). It would only do more work
automatically in the future and report appropriate warnings
or errors if it runs into a problem.

	Steffen
-
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)