What Does the “git rebase” Command Do?

Problem scenario
You are familiar with codebases in the context of configuration management or version control.   How can you invoke "git rebase" to learn more about git?

If you use the man page for "git rebase" you see this phrase to define "git rebase":  "Forward-port local commits to the updated upstream head"

What does "Forward-port local commits to the updated upstream head" mean?

According to Steve Bennett, it means "Sequentially regenerate a series of commits so they can be applied directly to the head node." 

The phrase "forward-port" means applying a change from one code base to another. (Do not confuse forward-port with TCP/IP ports.  The term port here is not a reference to TCP/IP.  In our experience however, this git usage of "forward-port" is very rare.)

The term "head" "is a reference to the last commit in the currently checked-out branch" according to this StackOverflow posting.  The "git rebase" command reapplies commits to another base of code according to this external website which has more detailed information about "git rebase".

Leave a comment

Your email address will not be published. Required fields are marked *