Back to Browse

Change a Git Commit in the Past with Amend and Rebase Interactive

39.0K views
Mar 16, 2021
18:05

We'll change the last commit's message and also do an interactive rebase on an older commit. Hit the subscribe button to receive more videos like this! REFERENCE LINKS --------------------------------------------------- ► https://github.com/nickjj/build-a-saas-app-with-flask ► https://github.com/nickjj/dotfiles COURSES --------------------------------------------------- Courses I've created that focus on web dev and deployment topics. ► https://nickjanetakis.com/courses/ THE TOOLS I USE / GEAR --------------------------------------------------- ► https://nickjanetakis.com/blog/the-tools-i-use FOLLOW ME ELSEWHERE --------------------------------------------------- ► Twitter: https://twitter.com/nickjanetakis ► GitHub: https://github.com/nickjj TIMESTAMPS --------------------------------------------------- 0:00 -- What we're going to cover in this video 0:20 -- Use cases for wanting to change a commit 1:03 -- The project we'll be amending commits in 2:04 -- Amending the last commit message 3:15 -- Amending a file in the last commit without editing the message 5:44 -- Adding or removing multiple files and amending the last commit 6:20 -- Preparing to do an interactive rebase 7:25 -- Figuring out which commit to amend using HEAD~N or the direct SHA 9:15 -- Starting an interactive rebase with git rebase --interactive [SHA]^ 10:18 -- Making our changes as part of the interactive rebase 11:39 -- Adding our changes and amending the commit during the rebase 12:33 -- Pulling the trigger and finalizing the rebase 13:21 -- Aborting a rebase in case you decide not to apply it 14:44 -- Using git stash to rebase a commit without mixing in our un-staged changes 17:35 -- Recap and do you have any questions?

Download

0 formats

No download links available.

Change a Git Commit in the Past with Amend and Rebase Interactive | NatokHD