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

  • Home
  • SEARCH
  • 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 7014975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:35:32+00:00 2026-05-27T22:35:32+00:00

I was initially in master branch, then I create a development branch and use

  • 0

I was initially in master branch, then I create a development branch and use that branch by:

git branch development
git checkout development

After that, I start to make changes in my project on development branch.

Then, I commit and push :

git push origin development , so, I created a remote development branch.

Finally, I go back to master branch:

git checkout master ( without merge the changes made on development branch)

Then:

git pull origin master (to get the other developers’ changes on master branch)

BUT, surprisingly, all the changes on development branch are applied to master branch!! WHY?? I did not run command git merge development after I went back to master branch, why the changes applied to my master branch??

As it has already happens, how can I revert back my master branch to be without the changes from development branch now?

  • 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-27T22:35:32+00:00Added an answer on May 27, 2026 at 10:35 pm

    in git log, I saw one developer did “Merge remote-tracking branch ‘origin/master'” could that be the reason?

    Yes, it is the reason, and your git pull origin master will:

    • fetch the content of origin/master (which already contain the merge with origin/development)
    • merge it with your local master branch (fast-forward merge)

    Considering that origin/master has already been cloned around, I wouldn’t advise changing its history at this point. So no ‘git reset‘.

    Should you need to go on working from a master before the merge, simply get the right SHA1 from git log and:

    git checkout -b my_new_branch right_SHA1
    

    You would start a new branch from you last master HEAD before the merge.

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

Sidebar

Related Questions

I'm using git-svn; I typically create a topic branch, make commits to it, then
Initially, the ‘master’ branch contained two directories. (Let’s say ‘dir1’ and ‘dir2’) A development
Initially i was planning to use master page for every page in my application.
I am discovering how to use git. I just made the following test: create
Initially I had a method in our DL that would take in the object
I initially thought that 64 bit instructions would not work on OS-X 10.5. I
I'm trying to use git-p4 to clone perforce depot. I keep running into a
I have a Git repository with two branches: master and redesign . The redesign
How can you merge two branches in git, retaining necessary files from a branch?
I've seen this command floating around on various sites. git checkout --track -b <...>

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.