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 9259615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:41:57+00:00 2026-06-18T12:41:57+00:00

An explanation is needed. So i worked on feature branch (lets call it feature/feature1

  • 0

An explanation is needed. So i worked on feature branch (lets call it feature/feature1), commit and push to remote.

git commit -m "commit feature1"
git push origin feature/feature1

Then I started working on a new feature, but instead of checking out to develop, pulling and creating new feature branch, I continued working on feature/feature1 branch.

I don’t want to discard changes, how can I do in a way to create new branch and moving all new changes from feature/feature1 branch to the new created branch? Thanx.

  • 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-06-18T12:41:58+00:00Added an answer on June 18, 2026 at 12:41 pm

    You can use the --onto parameter of rebase to move some changes from one branch to another. There’s an example of how to do that in the documentation, the section that starts with

    Here is how you would transplant a topic branch based on one branch to another, to pretend that you forked the topic branch from the latter branch, using rebase –onto. …

    Your commands will probably looks something like this:

    git branch feature/feature2
    git reset --hard <sha1 of last commit of feature 1>
    git rebase --onto <where you want branch to start> feature/feature1 feature/feature2 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Playing with Git and GitHub,I found that sometimes a git commit -a is needed
This might be confusing, so just ask if a better explanation is needed. I
I needed a quick explanation on how to get an AJAX style file upload
Possible Duplicate: Two phase lookup - explanation needed When I'm using a template class
Sometime ago the question Ms-RL - Explanation needed was posted. The only answer given
Some time ago I stumbled upon an explanation on how to set up git
Explanation: i have few objects and im declaring them inside $(document).ready(). WHY? because in
Explanation I have a multidimensional array that is iterated over to created a categorized
Quick Explanation One Silverlight (3.0) project with several XAML pages. I want to load
Short explanation of my problem, I need to parse an object and put its

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.