diff --git a/dim b/dim
index a68cc28fd4b2fc28fef0f8a02294cef8fb7cc496..f1ca50f0d81100bb69047e1fc42c0eb94a1d22d8 100755
--- a/dim
+++ b/dim
@@ -345,6 +345,29 @@ function dim_commit_add_tag
 	done
 }
 
+# $1: branch [optional]
+function git_find_tip
+{
+	git log $1 -1 --format=%H --grep="^drm-tip: .* integration manifest$"
+}
+
+# $1: branch [optional]
+function dim_retip
+{
+	local branch upstream remote
+
+	branch="$1"
+	shift
+	remote=$(url_to_remote $drm_tip_ssh)
+	upstream=$(git_find_tip "$branch")
+
+	if [[ -z "$upstream" ]]; then
+		echoerr "$branch is not based on drm-tip"
+		return 1
+	fi
+
+	git rebase --onto $remote/drm-tip $upstream $branch "$@"
+}
 
 # update for-linux-next and for-linux-next-fixes branches
 function update_linux_next # branch next next-fixes fixes
diff --git a/dim.rst b/dim.rst
index f624b79948acb548185f715ef66b4eaf5e06ccaa..a778701c7335d58a5978fb5b20e873a369887226 100644
--- a/dim.rst
+++ b/dim.rst
@@ -362,6 +362,12 @@ uptodate
 --------
 Try to check if you're running an up-to-date version of **dim**.
 
+retip [*branch*] [*git-rebase option* ...]
+------------------------------------------
+
+Rebase the given local branch, current branch by default, onto drm-tip. Options
+after the branch will be passed to **git-rebase**.
+
 help
 ----
 Show this help. Install **rst2man(1)** for best results.