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

git-reset HEAD --permissions-only

From
NKNeal Kreitzinger <neal@rsss.com>
Date
Mar 14, 2011, 20:29 UTC
Message-ID
<illts0$c6q$1@dough.gmane.org>

Is there a way to only reset the file permissions of the working-tree to match HEAD file permissions without resetting the content of the files?

HEAD file permissions = the permissions of the objects in the object store.

I'm using the vendor branch method of the git-rm manpage (git ls-files -z | xargs -0 rm -f && tar xzf vendor-version.tar.gz && git add -A) and I want to discard the vendor's file permissions changes to existing files and reset them back to what they are in HEAD.

"existing files" = ALL files that already existed in the HEAD and are not "deleted" or "new" in the working-tree relative to the HEAD. HEAD = before "rm" Working-Tree = after the untar.

v/r, Neal

Next: Jeff King
Message 1 of 4 in “git-reset HEAD --permissions-only”
  1. Neal KreitzingerMar 14, 2011
  2. Jeff KingMar 15, 2011
  3. Neal KreitzingerMar 16, 2011
  4. Jeff KingMar 17, 2011

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.