git branch - git checkout with different node_modules folder -


i have 2 branches, 1 called "gh-pages" , other "master" branch. both having separate folders "node_modules", different. , untracked!

so when checking out e.g. "gh-pages" branch follows

git checkout gh-pages 

i need way specify git should not remove (but save) tracked, untracked files , folders (like "node_modules" folder) "master" branch. , load tracked files , folders "gh-pages" branch , untracked files , folders.

is there simple way or need remove untracked files , folders each checkout 2 not come cross?

this not possible in git. definition untracked files part of file system , not git's version control.

git checkout

updates files in working tree match version in index or specified tree. if no paths given, git checkout update head set specified branch current branch.

so when checkout branch working copy of files in branch. since untracked files node_modules not part of specific branch local file system remain is.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -