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
Post a Comment