0

I am relatively new to using Git and I am having some issues switching branches.

I have two branches: main and experiment. In both branches, I have a file called "admin.html". I changed its name to "admin1.html" while in my main branch. I then I switched to my experiment branch:

git checkout experiment

After switching branches, I noticed that the file name is still "admin1.html" - which it shouldn't be since I only changed the file name in my main branch, not my experiment branch.

Can someone let me know if I'm doing something wrong? Thanks!

Zoe
  • 27,060
  • 21
  • 118
  • 148
Trung Tran
  • 13,141
  • 42
  • 113
  • 200

1 Answers1

-2

Sometimes when checking out between branches not all files get removed.

Try doing a clean up operation:

git clean -xdf

soul
  • 315
  • 2
  • 3
  • 9