@@ -, +, @@ --- eclass/git-2.eclass | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) --- a/eclass/git-2.eclass +++ a/eclass/git-2.eclass @@ -344,6 +344,8 @@ git-2_update_repo() { if [[ ${EGIT_LOCAL_NONBARE} ]]; then # checkout master branch and drop all other local branches git checkout ${EGIT_MASTER} || die "${FUNCNAME}: can't checkout master branch ${EGIT_MASTER}" + git clean -d -f -x || die "${FUNCNAME}: failed to clean checkout dir" + for x in $(git branch | grep -v "* ${EGIT_MASTER}" | tr '\n' ' '); do debug-print "${FUNCNAME}: git branch -D ${x}" git branch -D ${x} > /dev/null --