I run the git checkout command for a given branch in the code repo
/util/bin/git checkout experimental-branch
I got the following error message, what does it mean, and how to address this kind of issue.
error: Your local changes to the following files would be overwritten by checkout:
tests/test_plan.py
Please commit your changes or stash them before you switch branches.
CodePudding user response:
Before switching branches you have to commit the existing changes or stash them or even you can reset them.
To commit you can follow these steps
git add .
git commit -m "Your commit message"
To Stash
git stash
To reset
git reset --hard
CodePudding user response:
it is saying that, you need to commit the changes before switching the branches
do this,
git add.
git commit -m "your message here"
hope this will help you. happy coding