Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6098369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:09:01+00:00 2026-05-23T13:09:01+00:00

I use git rebase –onto target source foo to move the branch foo from

  • 0

I use git rebase --onto target source foo to move the branch foo from the branch source onto the branch target. Do you know if it is possible to use hash values instead of branch names (if not given) like this: git rebase --onto ab91c f4242 foo?
As a workaround I temporarily added branch names to the relevant commit objects. But this can be a pita if you have many branches to being rebased.

Example situation:

° bb42a
° ab91c
° 979c2
          /° fb648 foo
° f4242 --
° 333c9

After git rebase --onto ...

° bb42a
          /° fb648 foo
° ab91c --
° 979c2
° f4242
° 333c9

Background:
The explained problem is very common if you use an svn-server as you remote repository. All you commit objects get rewritten since the svn-id will be added every time you git svn dcommit to the svn-repository. This detaches all other branches from their former master.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:09:01+00:00Added an answer on May 23, 2026 at 1:09 pm

    What is sure:

    • a git rebase (not a git-svn rebase) can accept any valid commit as an argument, so hash values will work.
    • The caveat section of git-svn does warn you of:

    avoid all git clone/pull/merge/push operations between git repositories and branches.
    The recommended method of exchanging code between git branches and users is git format-patch and git am, or just ‘dcommit’ing to the SVN repository.

    So you need to make sure to not introduce commits in a SVN-synchronized branch which wouldn’t know about that commit and would report as such.
    (you have the opposite case in the SQ question “git svn – <file> was not found in commit <hash>“)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know of some people who use git pull --rebase by default and others
I understand that when I use git pull --rebase , git will re-write history
I'd like to use git rebase -i to squash the commits that I have
I have a git branch (called v4), that was made from master just yesterday.
I have the task of migrating my team & source from git to Perforce,
I'd like to use git rebase so as to cleanly merge a feature in
I always use git rebase to sync my code, I found that git stash
I use git svn to track a SVN repo. When I try to do
I use git for my local work (and love it ever so much), and
I use git checkout -b somebranch origin/somebranch to make sure my local branches track

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.