![]() ![]() Once you are satisfied with your changes, runĪt this point, you can edit any of the files in your project to make any additional changes. Git gets to the edit dd1475d operation, stops, and prints the following message to the terminal: You can amend the commit now, with Both changes will have the same commit message: "Patch B". fixup merges the changes from c619268 into the commit before it, 6b2481b. It also processes the fixup command ( fixup c619268), since it doesn't require any interaction. Git processes the two pick commands (for pick 7b36971 and pick 6b2481b). When the editor is closed, the rebase continues: pick 1fc6c95 Patch A Otherwise, you have the option of changing the commit message by simply changing the text. If you're happy with these commit messages, you can save the file, and close the editor. This file is Git's way of saying, "Hey, here's what I'm about to do with this squash." It lists the first commit's message ( "Patch A"), and the second commit's message ( "something to add to patch A"). # with '#' will be ignored, and an empty message aborts the commit. # Please enter the commit message for your changes. The file it opens up looks something like this: # This is a combination of two commits. Since this operation requires your input, Git opens your text editor once again. It goes to the next command, squash fa39187. Git skips the first rebase command, pick 1fc6c95, since it doesn't need to do anything. Now, save and close the editor this will start the interactive rebase. We've changed each line's command from pick to the command we're interested in. Squash fa39187 something to add to patch A To start, we'll need to modify the commands in the file to look like this: pick 1fc6c95 Patch A Phew! This sounds like a lot of work, but by taking it one step at a time, we can easily make those changes. ![]() Fix the commit message of the misspelled commit ( 4ca2acc), using reword.Split the third commit ( dd1475d) into two smaller commits, using edit. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |