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

Re: [Request] Git reset should be able to ignore file permissions

From
ANAlexander Nestorov <alexandernst@gmail.com>
Date
Jun 19, 2013, 08:00 UTC
Message-ID
<CACuz9s0jqe9zErBLZ5+kv2OCKW5fFHq0sifc2GS=n4jFpDiQZw@mail.gmail.com>
In-Reply-To
<vpqsj0emzdu.fsf@anie.imag.fr>
Ok, this is how it looks. If everything is ok, I'm sending it to the ML
>From 262bdfb5cc84fec7c9b74dc92bb604f9d168ef9a Mon Sep 17 00:00:00 2001
From: Alexander Nestorov <alexandernst@gmail.com>
Date: Wed, 19 Jun 2013 09:55:42 +0200
Subject: [PATCH] Add example for reseting based on content changes instead of
 stat changes
---
 Documentation/git-reset.txt | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index a404b47..da639e9 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -289,6 +289,18 @@ $ git reset --keep start                    <3>
 <3> But you can use "reset --keep" to remove the unwanted commit after
     you switched to "branch2".

+Reset only files who's content changed (instead of stat information)::
++
+------------
+$ git update-index --refresh               <1>
+$ git reset --hard                         <2>
+------------
++
+<1> Make Git realize which files actually changed instead of
+checking out all files whether their content changed or only
+their mtime changed.
+<2> Now git reset --hard will checkout only the files that
+actually changed.

 DISCUSSION
 ----------
--
1.8.1.msysgit.1
Previous: Matthieu MoyNext: Matthieu Moy
Message 12 of 18 in “[Request] Git reset should be able to ignore file permissions”
  1. Alexander NestorovJun 18, 2013
  2. Matthieu MoyJun 18, 2013
  3. Alexander NestorovJun 18, 2013
  4. Matthieu MoyJun 18, 2013
  5. Alexander NestorovJun 18, 2013
  6. Matthieu MoyJun 18, 2013
  7. Alexander NestorovJun 18, 2013
  8. Alexander NestorovJun 18, 2013
  9. Matthieu MoyJun 18, 2013
  10. Alexander NestorovJun 18, 2013
  11. Matthieu MoyJun 19, 2013
  12. Alexander NestorovJun 19, 2013
  13. Matthieu MoyJun 19, 2013
  14. Junio C HamanoJun 19, 2013
  15. Alexander NestorovJun 20, 2013
  16. Hilco WijbengaJun 19, 2013
  17. John KeepingJun 18, 2013
  18. Alexander NestorovJun 18, 2013

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.