W
W
Wynell_ru2020-04-29 00:41:30
git
Wynell_ru, 2020-04-29 00:41:30

Is it possible to make a commit between the old two commits?

Let 's say
git init -> commit A -> commit B -> commit C
can I cram, for example, commit D between commits A and B? to get it like this:
git init -> commit A -> commit D -> commit B -> commit C

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2020-04-29
@Wynell_ru

Can I cram, for example, commit D between commits A and B? to make it look like this:

You can with git rebase. The complexity of stuffing directly depends on how many common lines change D, B and C. If they are completely independent, git rebaseit will do everything itself, if not, you will have to resolve conflicts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question