After years of working as a sole developer with one git master
branch, I am investigating using additional branches. My plan is to keep master
as a production-ready branch, do development in a develop
branch, and create feature branches off develop.
After much reading, I have created a branch (from my master branch), called develop:
git checkout -b develop
I then created a feature branch off develop:
git checkout -b my-feature
I then modified a file in the my-feature
branch and switched back to develop
as follows:
git checkout develop
The problem is that when I view the file I changed in the feature branch, the change is still visible. Why is that so? I am on the develop branch!