What is "ours" and "their" while doing git rebase

In order to easily remember the direction of ours and theirs, think of rebasing as cherry-picking each commit of the current branch onto the target branch.

Before rebasing:
    A--B--C (master)
       '--D--E (devel, HEAD)

Reset HEAD to master:
    A--B--C (master, HEAD)
       '--D--E (devel)

Cherry-pick D, E.
    A--B--C (master)
       |  '-- D'--E' (HEAD)
       '--D--E (devel)
HEAD becomes "ours" and the old devel branch "theirs".
              ^^^^                            ^^^^^^

On success, repoint devel to E':
    A--B--C (master)
          '--D'--E' (devel, HEAD)

In a non-interactive rebase that goes through without conflicts, it looks like we jump straight from the old devel-branch history to the rebased devel-branch history. In this view the inversion of ours and theirs isn't apparent, leading to potential confusion, especially also during merge conflict resolution – it is simply a bit unexpected, that the branch we started from may suddenly be called "remote branch" by merge tools.


Though this question was already answered, I add this more visual explanation, since I found it difficult to remember the result without.


Briefly, when we are talking about rebase, ours means the base branch.

So in your case ours will be app/demandware, since firstly git moves us there, and then applies changes from the app/dashboard-sprint-5, which will be theirs.

For example, here the note from documentation about rebase and ours word:

Because git rebase replays each commit from the working branch on top of the <upstream> branch using the given strategy, using the ours strategy simply discards all patches from the <branch>, which makes little sense.