Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 63 lines (49 sloc) 2.67 KB
# Call this program to install G2
[ `basename $BASH` != "bash" ] && echo "G2 only supports bash at the moment, thank you for trying." && exit 1
# Figure the script HOME PATH
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
cd $DIR
export G2_HOME=$DIR
export GIT_PS1_DESCRIBE_STYLE=branch
source ./cmds/
"${boldon}g sync${boldoff} adds your changes to the tip of the branch and synchronizes with the servers both ways."
"${boldon}g freeze${boldoff} is a handy command to freeze all the changes in one shot."
"${boldon}g2${boldoff} saves time by providing high level commands."
"${boldon}g2${boldoff} is safer than git as it prompts before destructive actions."
"run ${boldon}g setup${boldoff} to configure git."
"${boldon}g2${boldoff} provides two letter acronyms for most commands."
"${boldon}g2${boldoff} eases the merge process by introducing ${boldon}g continue${boldoff} and ${boldon}g abort${boldoff}."
"${boldon}g2${boldoff} purposely provides a reduced set of commands."
"${boldon}g2${boldoff} enhances command line experience with auto-completion <TAB-key> and a smart prompt."
"${boldon}g2${boldoff} warns when the branch history was changed on the server (forced pushed)."
"${boldon}g2${boldoff} checks the branch freshness prior to merging and warns accordingly."
"${boldon}g2${boldoff} enforces a clean linear history by introducing new commands."
"${boldon}g2${boldoff} requires a clean state before rebasing, checking out, branching or merging."
"${boldon}g2${boldoff} provides guidance when it cannot perform an operation."
"${boldon}g2${boldoff} brings a number of friendly commands such as : ${boldon}panic, sync, freeze, wip${boldoff}."
"${boldon}g2${boldoff} eases branch creation. try it ${boldon}g br myBranchName${boldoff}."
"Need to display your ssh public key? try ${boldon}g key${boldoff}."
"${boldon}g2${boldoff} is just easier at undoing things: try ${boldon}g undo commit${boldoff} or ${boldon}g undo merge${boldoff}."
"When lost, ${boldon}g panic${boldoff} is the easiest way to get back on track."
"Use ${boldon}g track${boldoff} to review how local/remote branches are setup."
"Remember, you may always access the native git command using \"\$GIT_EXE\"."
"Unlike git, ${boldon}g2${boldoff} actions only apply to the current branch.");
echo -n -e "Installing ${boldon}G2${boldoff}.."
source ./
echo -n "."
source ./
echo -n "."
source ./
echo -n "."
source ./
alias g=__g2_eval;
alias git=__g2_eval;
echo " Enjoy!"
echo -e "${boldon}Tip of the day${boldoff}: ${tips[RANDOM % ${#tips[@]}]} ${reset}"
cd $OLDpwd
Jump to Line
Something went wrong with that request. Please try again.