Get repository details like branch name, commit status, and changes in the Command Prompt using Git.
To get started with GitPrompt, simply create a new repository and set your prompt using the following commands:
$ git init;
touch x;
git add x;
git commit -m x
$ export PS1='cwd $(../gitprompt $?) $'
Once you've set up your prompt, you'll be able to easily track the current branch using the following commands:
cwd master $
git checkout -b new
cwd new $
git checkout master
cwd master $
echo y1 > y;
git add y;
git commit -m y1;
git checkout new
Additionally, GitPrompt makes it easy to determine the number of saved stashes using the following commands:
cwd new $
echo y2 > y;
git add y;
git stash save
cwd new stash $
touch z; git add z; git stash save
cwd new stashes! $
git stash pop ; git stash pop
If you're in the process of a rebase, GitPrompt will let you know using the following commands:
cwd new $
git rebase master
cwd new rebase! $
git rebase --abort
cwd new $
git config core.editor true; git rebase --interactive master
cwd new rebase! $
git rebase --abort
Lastly, if GitPrompt has been passed a non-zero exit code, it will display this for you as well:
cwd new $
true
cwd new $
false => 1
cwd new $
Overall, GitPrompt is a great option for anyone looking for an efficient and reliable software that makes keeping track of important Git variables a breeze.
Version 0.1.1: N/A