Git won't allow me to switch branches -


$git branch stable development

i have properties file has password database connection, had change properties file (say xyz.properties) password. can use on local server. , added file path .gitignore , $git update-index --assume-unchanged xyz.properties

$git status on branch stable branch up-to-date 'origin/stable'. nothing commit, working directory clean

now wanted change ...branch development $git checkout development

error: local changes following files overwritten checkout: .gitignore x/y/z/xyz.properties

please, commit changes or stash them before can switch branches. aborting

now want change branch development , make branch , work on them.

so how can achieve task...please me out. in advance

edit when tried $git stash no local changes save

note: need use local server every branch , required xyz.properties files modified because local db has different password repository.

this common problem, namely error:

error: local changes following files overwritten checkout 

in short, can suggest remove files(rm) , perform checkout. otherwise also, add , stash them. forcing checkout like:

git checkout --force master 

could option.

i not sure, have seen question: how make git ignore .idea files created rubymine? looks adamnyc has same problem.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -