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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:39:08+00:00 2026-06-05T15:39:08+00:00

A simple/newbie question. I create a branch from the master branch (say testing), tried

  • 0

A simple/newbie question.
I create a branch from the master branch (say “testing”), tried some stuff, and merged it back. Now when I modify the “testing” branch, the local changes are also made on the master branch.

Should I then delete a branch once it is merged and not reuse it? I thought that the branch would just diverge…

To make it clearer, what I do is:

git checkout master
git branch testing
git checkout testing
// Modify files...
git add <modified-files>
git commit -m 'It worked!'
git checkout master
git merge testing

// Now I go back and edit the testing brach
git checkout testing
// Edit files...
git checkout master
// I can see the local changes I made to the testing branch!! (?)

Thanks for any help.

  • 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-05T15:39:09+00:00Added an answer on June 5, 2026 at 3:39 pm

    The changes are only in the working copy, they are not in any branch yet. If you do git commit -a -m 'The changes' before checking out master again, your changes are committed to the testing branch.

    If you want to just check out master, but you are not ready to commit the changes you made on the testing branch, you can use git stash to put your changes away for now. You have now a clean working copy and can do whatever you want (e.g. check out master and do commits there). After you are done, you can check out testing again and get your previous changes back with git stash pop.

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

Sidebar

Related Questions

Just a simple question from a relative Java newbie: what is the difference between
Total newbie question now... Suffice to say, I have searched for a completely noddy
Newbie question here! I'm building a simple application that allows users to create and
I am an Android newbie and I wanna create a simple mp3 player. Now,
first question from newbie. Haven't needed to post a question for months now --
This is a real newbie question. I have simple app that selects a picture
I`m a total newbie in php, so sorry for my simple question. Need to
i am newbie of c# and win phone 7 i create a simple database
Im a javascript newbie and would need some help with this simple thing... I
Here goes a newbie question: Create a new project in Xcode: File > New

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.