Considering I have the following ASCII graph:
A---B---C---D---E---F master
\ /
X---Y---Z topic
(stolen from a recent but unrelated question)
Is there a command/script/tool which accepts this as input and creates the dummy commits accordingly?
Creates an empty commit. Use git commit --allow-empty -m <message> to create an empty commit with the provided <message> .
Pushing an empty commit without adding any staged files to the branch is very easy. It is the same as pushing a regular commit, except that all you need to do is add –allow-empty flag to the command line. The commit is now pushed to your branch without any changes.
There are many ways to rewrite history with git. Use git commit --amend to change your latest log message. Use git commit --amend to make modifications to the most recent commit. Use git rebase to combine commits and modify history of a branch.
[Okay, I'll bite...] No, there isn't.
[edit] So you might ask "How can you answer 'no' - you can't prove a negative". Well, if you can define the 'universe' and exhaustively search the 'universe' then you can prove a negative. For my 'no' answer, I've defined the 'universe' as the set of git utilities provided as part of the git distribution. If you define the 'universe' as 'all current and future git utilities' then the answer might not be 'no.'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With