Re: [git-users] Highlevel (but simple to implement) commands provided by default for git
Bráulio Bhavamitra wrote:
> root = rev-parse --show-toplevel
What is your usecase for this?
> upstream = !git for-each-ref --format='%(upstream:short)' $(git
> symbolic-ref -q HEAD)
Again, what is the usecase? What doesn't @{u} do?> upstream-remote = !git upstream | sed -e 's/\\/.*$//g'
> out = !git fetch `git upstream-remote` && git l `git upstream`..HEAD
I didn't understand this at all. What are you doing?
> in = pull --dry-run
Show 5 quoted lines
> unmerged = !git ls-files --unmerged | cut -f2 | uniq
> untracked = ls-files --other --exclude-standard
> staged = ls-files --staged
> modified = ls-files --modified
> deleted = ls-files --deleted
What is wrong with git status showing a unified output?
> head = !git l -1
> current = rev-parse --abbrev-ref HEAD
Why don't you use a prompt? Use the one in contrib/completion/git-prompt.sh.