Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git clean all submodules on branch switch

# Be careful it will delete all untracked files, reset all stagated files
# and will remove all submodule folders
git reset --hard
git checkout gh-pages
git clean -xffd
# Optional restoration of submodules content
git submodule update --init --recursive
 
PREVIOUS NEXT
Tagged: #git #clean #submodules #branch #switch
ADD COMMENT
Topic
Name
3+4 =