Information Technology Reference
In-Depth Information
$ git show --name-only HEAD
proves that the last commit now contains three files b.txt , c.txt , and d.txt .
How It Works
During interactive rebasing git treats the contents you type in the editor as a list of sub-
commands. The Listing 8-4 , for example, contains three subcommands. One of them
is:
fixup a36ee90 c
It has the meaning: “perform fixup operation on revision a36ee90c.” Here is the
complete list of available subcommands for interactive rebasing:
pick —the commit will appear in the resulting history
reword —the commit will be used, but git will allow modification of its
comment
edit —the commit will be used, but git will allow modification (add and
remove files)
squash —the commit will be squashed into the previous one and git will
allow modification of the comment of the resulting commit
fixup —the same as squash, but this time git will not allow modification
of the comment of the resulting revision (the comment of the first revision
will be used)
exec —this command allows you to perform arbitrary shell command
Every subcommand can be abbreviated with its first letter. The commands you type
are executed by git one by one in the order they appear in the editor.
So what are the meanings of the commands shown in Listing 8-4 ? There are three of
them: the first is a pick command, the second is a fixup command, and the third is an-
other fixup command. The first command
pick f2136a0 b
Search WWH ::




Custom Search