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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:00:00+00:00 2026-05-31T19:00:00+00:00

So I usually create a feature branch in git, work on it, then merge

  • 0

So I usually create a feature branch in git, work on it, then merge with the master (trunk) branch.

I created a feature branch which I didn’t end up merging into master.

Now the master branch has progressed over the weeks/months, and I now want to work on that feature branch again, but I want to update it with whatever is in the master branch.

The feature branch is all new files so there should be any merge conflicts.

How would I go about doing this?

Note: I want this code to remain on a branch, in case I don’t want to merge it again as it is a major change.

If you could explain the theory behind it also so I can understand that would be great.

  • 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-31T19:00:01+00:00Added an answer on May 31, 2026 at 7:00 pm

    Checkout your feature branch, and either merge master into the feature branch (git merge master), or rebase the feature branch on top of master (git rebase master).

    Which one you choose depends on what you want your history to look like.

    If you merge, your old commits will continue to exist in their original state on top of the old version of master, with a new merge commit containing your changes and the new version of master. Some people like this because it accurately reflects the original history, and because it creates fewer conflicts than a rebase. However, this sort of practice can create a confusing history with a lot of merge commits. The ‘git bisect’ command also works poorly with histories that have a lot of merges.

    If you rebase, you will have a series of commits on top of your new master revision, and you will lose your original commits. This creates a straightforward, linear history. You can also use ‘git rebase -i’ to clean up your commits before publishing or adding them to master (should you choose to do that). Because conflicts must be resolved for each of your commits, instead of just once for a merge commit, rebasing generates more conflicts.

    I prefer to rebase code that I haven’t published yet, and only merge when I really need the history to show development that happens in two places in parallel (such as a project that I have forked and modified, without intending to send my changes upstream; I will then merge in changes from upstream from time to time).

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

Sidebar

Related Questions

My usual workflow with git is to create a new feature branch, do some
i just create reading file feature. In general, what kind PHP class that usually
I usually create a pixel format using wglChoosePixelFormatARB() with these arguments (among others): WGL_DOUBLE_BUFFER_ARB
I usually create a gridview based on data so it will have the rows
I am having two issues: I usually create separate view for the login to
When I'm building a class library I usually create a file Enums.cs to hold
When I generate sql schema creation scripts manually I usually just call 'Create Procedure...',
It seems dead simple, as to create an NSURLConnection I usually do this: NSURL
I want some code to be triggered every second. Usually, I'd create a Timer
When I want to add a new feature to our project, I create a

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.