3 ms·
> The obvious challenges seem to be managing temp-branch vs. “real” current branch state in a way that doesn't mess up or get messed up by other tools interacti
by Hackbraten 6y ago
> The obvious challenges seem to be managing temp-branch vs. “real” current branch state in a way that doesn't mess up or get messed up by other tools interacting with the repo (including ha sling things like pulls and other inbound changes to your “real” active branch), and generating non-noise automated commit messages.
Low-level plumbing commands, if the VCS has them, can help with that, e. g. `git commit-tree`.
- AlexCoventry 6y agoWhere would you want to use `git commit-tree`?
- Hackbraten 6y agoIt’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=102478 https://devblogs.microsoft.com/oldnewthing/20190506-00/?p=10... List of related blog entries: https://news.ycombinator.com/item?id=20620441 https://news.ycombinator.com/item?id=20620441
- AlexCoventry 6y agoThanks.