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

Re: git revert with partial commit.

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 3, 2023, 17:07 UTC
Message-ID
<xmqqa5zo7v3l.fsf@gitster.g>
In-Reply-To
<20230402141613.yeseo5fj3lafuf7w@tb-raspi4>
Torsten Bögershausen <tboegi@web.de> writes:
Show 8 quoted lines
> Find the last commit that had those 2 files, in other word the commit
> before f18fbd1e16a1ca4215621, say it is xyz.
>
> git checkout xyz -- Public/CTAN/IDE/phonon/compile-install-phonon
> should get the first file back into your working tree and staged.
>
> (Of course, this is out of my head. And you should be able to "restore"
> both files in one go.)

If the (old) version of these files existed in one (old) commit, yes, you should be able to do that.

Thanks.
Previous: Torsten BögershausenNext: Hongyi Zhao
Message 3 of 18 in “git revert with partial commit.”
  1. Hongyi ZhaoApr 2, 2023
  2. Torsten BögershausenApr 2, 2023
  3. Junio C HamanoApr 3, 2023
  4. Hongyi ZhaoApr 4, 2023
  5. Phillip SusiApr 3, 2023
  6. Hongyi ZhaoApr 4, 2023
  7. Hongyi ZhaoApr 4, 2023
  8. Hongyi ZhaoApr 4, 2023
  9. Chris TorekApr 4, 2023
  10. Sergey OrganovApr 4, 2023
  11. Junio C HamanoApr 4, 2023
  12. Sergey OrganovApr 4, 2023
  13. Junio C HamanoApr 4, 2023
  14. Felipe ContrerasApr 4, 2023
  15. Sergey OrganovApr 5, 2023
  16. Felipe ContrerasApr 7, 2023
  17. Sergey OrganovApr 7, 2023
  18. Phillip SusiApr 6, 2023

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.