Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 142f5474de
Fetching contributors…

Cannot retrieve contributors at this time

executable file 18 lines (13 sloc) 0.524 kB
source "$G2_HOME/cmds/"
isBranch=$("$GIT_EXE" branch -a | grep -c "$1")
[[ $isBranch -gt 0 ]] && {
"$GIT_EXE" abort
$("$GIT_EXE" g2haschanges) || exit 1
g2excludes=$("$GIT_EXE" config --global --get g2.panic.excludes)
"$GIT_EXE" checkout "$@" && "$GIT_EXE" clean -fdx $g2excludes
exit $?;
echo_info "There is no branch named '$1', you may want to run 'g fetch <remote_name>' to refresh from the server"
echo_info "If you are trying to revert a file, consider 'g undo <file>'"
Jump to Line
Something went wrong with that request. Please try again.