Assuming I have a repository with two braches: main and dev
On branch main i have the following files: myFile1, myFile2, and MyFile3 - let’s assume myFile 2 is a configuration file wich I must have locally, but don’t need to have it on dev branch.
(I need to have this file on branch main, because the server deploys from it)
On branch dev I have only: myFile1 and myFile3.
When I run ‘git checkout main’, the 3 files are added to my local folder, so I want to change to the dev branch. But, when i run ‘git checkout dev’, the file myFile2 is removed from the local folder, since it’s not on dev branch. I have myFile2 at .gitignore, but, idk why, it’s not being ignored.
Can someone help me, please?