How to understand the "current branch is up-to-date" error when rebasing – 113

This might be a bug with the Git Visualization tool. Via the command line, if your branch can already perform a fast-forward merge, Git won’t let you do a rebase. However, the visualization tool allows for it.

Suppose you create a new branch `experiment` and add 1 commit. Then you try to do a rebase on master. You’ll get the following error.

Current branch experiment is up to date

My guess why this makes sense is because Git is protecting you (or others from you) from rewriting history. In other words, there’s nothing to rewind, so no rebase.

However, the visualization tool allows for it, but I think this is a bug. Hence why always important to experiment IRL!

thinking this visualization is a bug

2 thoughts on “How to understand the "current branch is up-to-date" error when rebasing – 113

  1. I think of rebasing as changing what commit a “branch” (not the reference, but the chain of commits) is based on (i.e. the common ancestor). If master points to commit c4 when you create your branch, then your branch is “based on” c4. You do some commits to master (now points to c9) and some commits to your branch. When you do “git rebase master”, you’re changing which commit your branch is based on from c4 to c9.

    If master didn’t have any new commits, then doing a “git rebase master” would be saying you want to change which commit your branch is based on from c4 to c4, which doesn’t change anything.

    The visualizer definitely has a bug.

    Like

Leave a comment