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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:10:29+00:00 2026-06-14T19:10:29+00:00

Let me see if I got this right, I’m new to Git. Assume I’ve

  • 0

Let me see if I got this right, I’m new to Git.

  1. Assume I’ve created a fork of a project on GitHub and made some changes. If I were to commit, push and register a pull request of these changes its considered good practice to create a new named branch with a name specific for whatever I did.

  2. Because If I just used master and then pushed other (unrelated) changes to master on my fork they would automatically be appended to the pull request. At least that’s how I understand the following from using pull requests:

Pull requests can be sent from any branch or commit but it’s
recommended that a topic branch be used so that follow-up commits can
be pushed to update the pull request if necessary.

Assume that the pull request is accepted by the maintainer.

  1. If my topic branch is merged, all I need to do to get back in sync is fetch from the maintainers repo.

  2. But if the topic branch is rebased history has been rewritten and a fetch from the maintainer repo would yield me a “duplicate” of my topic branch (at least this is how it works in mercurial).

  3. Regardless if my branch is merged or rebased the branch (or rather the name) is deleted. Making the maintainers repo contain a single master branch.

  • 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-14T19:10:30+00:00Added an answer on June 14, 2026 at 7:10 pm

    In case you’ve posted stuff to your master branch that isn’t in upstream/master (upstream being the remote handle to the official repo) I’d recommend rolling back master a couple of commits and then merging upstream/master back in:

    >> git checkout master         # make sure we're on master
    >> git branch oldmaster        # create a new branch, just to be safe
    >> git reset --hard HEAD~100   # roll back 100 commits
    >> git fetch upstream          # fetch newest changes from upstream
    >> git merge upstream/master   # merge the main master branch into your local one
    

    You should end up with your messy master branch in oldmaster and the official one in master.

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

Sidebar

Related Questions

Let's see I want to do this, i want to get the parent of
First let me say that I did see this article: How to remove AspxAutoDetectCookieSupport
I've got such a structure, is described as a binomial tree. Let'see a drawing:
Let's say i got this ContextMenu: <Style x:Key={x:Type ContextMenu} TargetType={x:Type ContextMenu}> <Setter Property=VerticalOffset Value=-10/>
Maybe this is a no-brainer but i cant see the solution right now :)
I've got this chunk of code that pulls the git version of the current
Let's see if I can make the step-by-step clear: namespace InventoryManager.Controllers { public class
I know there are tools out there that will let you see the content
A picture is supposed to be worth a 1000 words, so let's see if
How can I let the user see the front facing camera, but prevent them

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.