Git - rebase

About

rebase is designed to integrate changes from one branch into another branch.

Example

Imagine this commit history (log) with a remote and a local branch where the commit in the remote branch will be integrated into the local branch.

- A - B - C - D - remote HEAD
    \
      E - F - G - local HEAD

After a rebase, the commit history (log) will look like:

- A - B - C - D - remote HEAD - E' - F' - G' - local HEAD'

merge is also designed to integrate changes: See What is the difference between a merge and a rebase?

Configuration

Automatic rebase of a branch before a pull request

git config branch.autosetuprebase local

Documentation / Reference





Discover More
Git - Client Installation

Git for windows provides a bash and a gui. It provides also all GNU core utility where: the global option tells Git to store the parameters on a global scope...
Commit History Forked
Git - Forked commit management

This is a page a local fork (ie a local branch). remote fork To incorporate the new commits into your feature branch, you have two options: merging or rebasing. Forked commit history
Git - Merge

Merge is a git merge tool that is designed to integrate changes from one branch into another branch It joins two or more branch together (ie development histories) The pull command is a wrapper that...
Pull Request

Pull request are not really a part of Git but are found really often in its workflow. With a pull request, you’re proposing your changes and requesting that someone review and pull in your contribution...
Branches Git
Git - Branch

This page talks Branch management in Git. For Git, a branch is: a commit name (ref) that points to the last commit (head) leaf in the commit log (or log) that represents a commit chain Example...
What is the difference between a merge and a rebase?

merge and rebase are two command that are designed to integrate changes between two branches They have one difference: Rebase will rewrite the commit history (log) to make it linear while merge will...



Share this page:
Follow us:
Task Runner