git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: pull into dirty working tree

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 13, 2007, 16:07 UTC
Message-ID
<Pine.LNX.4.64.0706131702020.4059@racer.site>
In-Reply-To
<18032.5016.716192.939675@lisa.zopyra.com>
Hi,
On Wed, 13 Jun 2007, Bill Lear wrote:
> I wonder, also, if there could be a way to alert users that their 
> working tree is dirty before all the git pull blather comes out, scaring 
> their poor little souls?
Well, it's their fault, isn't it?
Show 23 quoted lines
>  So, instead of this:
> 
> % git pull
> remote: Generating pack...
> remote: Done counting 122 objects.
> remote: Result has 90 objects.
> remote: Deltifying 90 objects.
> remote:  100% (90/90) done
> Unpacking 90 objects
> remote: Total 90 (delta 59), reused 41 (delta 10)
>  100% (90/90) done
> * refs/remotes/origin/master: fast forward to branch 'master' of
> git://source/sc
>   old..new: 171b65f..0be3472
> * refs/remotes/origin/v1.0: fast forward to branch 'v1.0' of
> git://source/sc
>   old..new: a9de9dd..efa3a73
> Updating 717d9f6..0be3472
> src/fs/testsuite/fs.tst/gettest: needs update
> src/nl/EocCompiler.cc: needs update
> src/nl/EocCompiler.hh: needs update
> src/nl/Nl.cc: needs update
> fatal: Entry 'src/netlist/EocCompiler.cc' not uptodate. Cannot merge.

Sorry, this is the first time Git can realize that the dirty working directory conflicts with the changes about to be applied.

For example, I run "git pull" very often with a modified Makefile. If the merge would not touch the Makefile, it would succeed. No need to do anything fancy.

If you do have to shut the (otherwise useful) messages up, you can always have an alias (using the advanced technique illustrated in another post in this thread).

Show 9 quoted lines
> % git pull
> Sorry, I can't pull, as you have a dirty working tree.  Please commit
> your changes or move your files before you pull.  These are the
> files that are preventing this:
> 
>     src/fs/testsuite/fs.tst/gettest
>     src/nl/EocCompiler.cc
>     src/nl/EocCompiler.hh
>     src/nl/Nl.cc
As far as I can see, gettest is not responsible, so this would be wrong.

Ciao, Dscho

Previous: Bill LearNext: Bill Lear
Message 19 of 35 in “pull into dirty working tree”
  1. Bill LearJun 13, 2007
  2. Pierre HabouzitJun 13, 2007
  3. Pierre HabouzitJun 13, 2007
  4. Pierre HabouzitJun 13, 2007
  5. Bill LearJun 13, 2007
  6. Pierre HabouzitJun 13, 2007
  7. Randal L. SchwartzJun 13, 2007
  8. Alex RiesenJun 13, 2007
  9. Randal L. SchwartzJun 13, 2007
  10. Alex RiesenJun 13, 2007
  11. Randal L. SchwartzJun 13, 2007
  12. Alex RiesenJun 13, 2007
  13. Randal L. SchwartzJun 13, 2007
  14. Alex RiesenJun 13, 2007
  15. Johannes SchindelinJun 13, 2007
  16. Andy ParkinsJun 13, 2007
  17. Johannes SchindelinJun 13, 2007
  18. Bill LearJun 13, 2007
  19. Johannes SchindelinJun 13, 2007
  20. Bill LearJun 13, 2007
  21. Junio C HamanoJun 13, 2007
  22. Daniel BarkalowJun 14, 2007
  23. Linus TorvaldsJun 14, 2007
  24. Junio C HamanoJun 14, 2007
  25. Raimund BauerJun 14, 2007
  26. Steven GrimmJun 14, 2007
  27. Nicolas PitreJun 14, 2007
  28. Bill LearJun 14, 2007
  29. Linus TorvaldsJun 14, 2007
  30. Olivier GalibertJun 14, 2007
  31. Linus TorvaldsJun 14, 2007
  32. Martin LanghoffJun 15, 2007
  33. Linus TorvaldsJun 15, 2007
  34. Martin LanghoffJun 15, 2007
  35. Robin RosenbergJun 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.