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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:21:55+00:00 2026-05-28T04:21:55+00:00

I had an SVN background before and I get used to working between branches

  • 0

I had an SVN background before and I get used to working between branches alternatively as a charm with it.

however, when I was trying to get myself familiar with GIT, I only found this VC work differently in the above-mentioned aspect.

for example.

in GIT. I initially created a branch called “Master”.

master
======
car.rb

Then, I branched out into a new branch “new_branch”.

new_branch
==========
car.rb
airplane.rb

from this point, I continued working on my recently added class “airplane.rb” so on and so forth. and then added it to the index.

and finally I needed to switch back to work on the master branch again.
what I only found when I did so was in the branch “master”, the newly added file from “new_branch” was still there. so, I got no idea how to work with at that moment.

what do you normally do when it comes to switching between branches very often like my case?

any advice would be very much appreciated!

  • 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-28T04:21:56+00:00Added an answer on May 28, 2026 at 4:21 am

    You put airplane.rb in your staging area, which means it’s not committed yet. When switching branches, git will keep your staging area intact, so that’s why you still see it when going back to master.

    You need to commit your changes when you are ready to do so, as the staging area is just… staging! It allows you to prepare the commit, but if you don’t commit the changes aren’t controlled.

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

Sidebar

Related Questions

our svn had so far traditional layout: trunk branches/ tags/ i cloned whole the
Coming from an svn background, I had this question: git equivalent of svn status
I had a boss, past-tense, who decided to put svn branches in the same
I did the following in an svn working copy I had: sheep@sheepbox# gvim Dual_On_Off_Model.h
I had an svn repository that I used to checkout with the svn+ssh protocol.
My project I am working on is version controlled under SVN. I had to
I had a problem with my svn server so I had to get all
Is this possible? I had troubles with SVN clients not being able to access
With SVN, I had a single big repository I kept on a server, and
I had downloaded and installed the 1.6.9 version of SVN from http://subversion.tigris.org/ . After

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.