bananaforscale
bananaforscale

Reputation: 878

Files and folders in Git Repo not changing when switching between Git branches

Ok, here is my scenario:

Step 1 - On Git master and status is up-to-date

Step 2 - Working on a project and need to add a feature

Step 3 - Create branch, build feature on new branch

Step 4 - Switch back to master and files/folders in the new feature are still there. What the heck?

So my question, I did not merge the branch into the master yet the branches files/folders are appearing in the master. Is this normal?

The behavior I was expecting is for un-merged files to stay in their respective branches and not show up until merged. I will experiment more on this. Maybe I'm thinking more GitHub and need to think more Git. Maybe I need to read more about branches and merging. Obviously still learning Git out there.

Upvotes: 0

Views: 34

Answers (1)

topheman
topheman

Reputation: 7912

You forgot to commit your work to your feature branch between step 3 and 4.

Upvotes: 5

Related Questions