From: Pierre Habouzit <madcoder@debian.org>
To: Bill Lear <rael@zopyra.com>
Cc: git@vger.kernel.org
Subject: Re: pull into dirty working tree
Date: Wed, 13 Jun 2007 16:53:42 +0200 [thread overview]
Message-ID: <20070613145342.GG5311@artemis.intersec.eu> (raw)
In-Reply-To: <18032.776.784080.321044@lisa.zopyra.com>
[-- Attachment #1: Type: text/plain, Size: 2713 bytes --]
On Wed, Jun 13, 2007 at 09:45:28AM -0500, Bill Lear wrote:
> [Pierre writes:]
> > I suppose the following way would work:
> >
> > $ git commit -a -m "temporary commit" # save current work
> > $ git branch -f dirty # ..in a separate branch
> > $ git reset --hard HEAD~1 # unwind this commit
> > $ git pull # perform a clean pull
> > $ git rebase master dirty # rewrite the work
> > <you may have to fix some conficts here>
> > $ git reset master # "undo" the commit
> >
> > So that's definitely doable.
> >
> > Though, in git, if you really work in a "pure" git environment, you
> >never pull until your work in your topic branch is ready for a merge.
> >It's a very bad habit to do otherwise: you don't _need_ to pull until
> >you have a clean slate.
>
> I know, but I can't throw git purity at them as an explanation, they
> won't understand. And they would disagree about the "need" to pull.
> That's for them to say: they WANT to pull without having to move aside
> the makefile that they modified to add the '-wingit' option to the
> compile line and just get on with their work without having to run 14
> different git commands.
>
> I'm not trying to justify their habits, but to try to see if there is
> any clinching reason why this habit is not only "bad", but positively
> harmful.
If it's because they have local modifications that match their use and
are not meant to be commited then I'd say that leaving it as "unclean"
work is a bad idea, because one day or the other they will have to
modify this Makefile to add a thing to commit for real. and then, 99
times over 100 they will commit their local modification too. _that_ is
harmful. And usually there is very soon a new commit to remove the local
change.
I have a project where we had .htaccess that people had to customize
to have their local checkout work in the devel web server setup. It was
always commited (wrongly). We weren't using git.
To solve those issues, there is many ways, not all are very handy, but
it works. The simplest way is to use a repository with a tool like
guilt, and each time you commit, you:
guilt pop -a (remove your changes)
... do the stuff ...
guilt push -a (push your changes again).
Maybe you can also have a local branch where you store those local
changes. But that's still a bit awkward to use. Maybe someone will come
with a better workflow for this.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-06-13 14:53 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-13 14:14 pull into dirty working tree Bill Lear
2007-06-13 14:38 ` Pierre Habouzit
2007-06-13 14:43 ` Pierre Habouzit
2007-06-13 14:47 ` Pierre Habouzit
2007-06-13 14:45 ` Bill Lear
2007-06-13 14:53 ` Pierre Habouzit [this message]
2007-06-13 15:01 ` Randal L. Schwartz
2007-06-13 19:28 ` Alex Riesen
2007-06-13 19:32 ` Randal L. Schwartz
2007-06-13 20:47 ` Alex Riesen
2007-06-13 20:52 ` Randal L. Schwartz
2007-06-13 21:39 ` Alex Riesen
2007-06-13 22:01 ` Randal L. Schwartz
2007-06-13 22:27 ` Alex Riesen
2007-06-13 15:01 ` Johannes Schindelin
2007-06-13 15:40 ` Andy Parkins
2007-06-13 15:54 ` Johannes Schindelin
2007-06-13 15:56 ` Bill Lear
2007-06-13 16:07 ` Johannes Schindelin
2007-06-13 16:30 ` Bill Lear
2007-06-13 17:13 ` Junio C Hamano
2007-06-14 4:22 ` Daniel Barkalow
2007-06-14 5:21 ` Linus Torvalds
2007-06-14 7:49 ` Junio C Hamano
2007-06-14 8:01 ` Raimund Bauer
2007-06-14 8:06 ` Steven Grimm
2007-06-14 14:25 ` Nicolas Pitre
2007-06-14 12:46 ` Bill Lear
2007-06-14 15:46 ` Linus Torvalds
2007-06-14 20:20 ` Olivier Galibert
2007-06-14 20:30 ` Linus Torvalds
2007-06-15 0:46 ` Martin Langhoff
2007-06-15 1:07 ` Linus Torvalds
2007-06-15 3:33 ` Martin Langhoff
2007-06-15 18:26 ` Robin Rosenberg
-- strict thread matches above, loose matches on Subject: below --
2007-06-13 15:03 MichaelTiloDressel
2007-06-13 15:36 ` Bill Lear
2007-06-13 17:31 ` Michael Dressel
2007-06-13 18:12 ` Bill Lear
2007-06-13 18:30 ` Johannes Schindelin
2007-06-13 18:56 ` Bill Lear
2007-06-13 20:17 ` Robin Rosenberg
2007-06-13 23:32 ` Johannes Schindelin
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=20070613145342.GG5311@artemis.intersec.eu \
--to=madcoder@debian.org \
--cc=git@vger.kernel.org \
--cc=rael@zopyra.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).