Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Where would you want to use `git commit-tree`?


It’s a convenient shortcut to take an existing commit and append to it a new commit that changes the file tree to any state you want. For example, if you want that new commit to result in the exact same file tree as another existing commit in the same repository, you can tell git commit-tree to make exactly that happen.

It will also just print the new commit hash without moving `HEAD`, which is why it may also be useful in dragonwriter’s use case.

Raymond Chen explains it way better than I do: https://devblogs.microsoft.com/oldnewthing/20190506-00/?p=10...

List of related blog entries: https://news.ycombinator.com/item?id=20620441


Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: