I have my whole production code in a repository and locally I had to changed some backend/frontend code out of neccessity and leave them in a permanant "unstaged change" mode.
Since I did all the test locally, I didn't need to use branches until today.
We now have a dev
branch and I commit my changes to dev
then checkout master
and git merge dev
.
The only issue is that anytime my change happens to one of those unstaged files, I get the famous:
Please commit your changes or stash them before you switch branches.
Aborting
This answer somehow helps https://stackoverflow.com/a/22424970 but this is not an efficient way for me to do this on every commit.
Is there any way I can do less work on each commit/merge?