Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create fake commits from graph

Tags:

git

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?

like image 639
Debilski Avatar asked Apr 20 '12 14:04

Debilski


People also ask

How do you create a dummy commit?

Creates an empty commit. Use git commit --allow-empty -m <message> to create an empty commit with the provided <message> .

How send empty commit?

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.

How do I make a git commit in the past?

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.


1 Answers

[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.'

like image 119
GoZoner Avatar answered Oct 07 '22 14:10

GoZoner