Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 29, 2013 at 1:11 PM, Bráulio Bhavamitra <brauliobo@xxxxxxxxx> wrote:
> ---------- Forwarded message ----------
> From: Bráulio Bhavamitra <brauliobo@xxxxxxxxx>
> Date: Wed, May 29, 2013 at 8:23 AM
> Subject: [git-users] Highlevel (but simple to implement) commands
> provided by default for git
> To: git-users@xxxxxxxxxxxxxxxx

> One of the things I note about git is that is provides mostly
> low-level and strictly necessary commands.
> Many highlevel commands are then implemented as alias by users, after
> a deep search on the internet.
>
> Adding highlevel commands, even though it could be implemented by a
> simple alias, would put git in another level
> of user experience and create a new standard for newbie users.
> What git developers think about this?

Completely agree.

>   root = rev-parse --show-toplevel
>
>  upstream = !git for-each-ref --format='%(upstream:short)' $(git
> symbolic-ref -q HEAD)

git rev-parse --abbrev-ref @{u}

>  upstream-remote = !git upstream | sed -e 's/\\/.*$//g'

git config branch.$(git rev-parse --abbrev-ref HEAD).remote

>  out = !git fetch `git upstream-remote` && git l `git upstream`..HEAD

'git fetch' without arguments is the same as git fetch `git upstream-remote`

Junio: See? It's not the expected behavior for most of our user-base.

'git log @{u}..HEAD' does the same as 'git log `git upstream`..HEAD'

>  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

I think we should have a user-friendly 'git ls' command.

>   head = !git l -1

Or 'git show --quiet'.

>  current = rev-parse --abbrev-ref HEAD

We should probably also add typical shortucts:

d = diff
l = log
f = fetch
p = push
r = reset
ci = commit
rb = rebase
co = checkout
st = status
pi = cherry-pick
mt = mergetool

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]