News for hackers. Stuff that matters.
Re:Working with git? These aliases will save you hours by yuvadam on Friday May 20, 2011 @08:38AM (#2567383)
Personally, I find these aliases a bit too terse.

Aliases are important for enhanced productivity, but shell aliases are too much. I find these git aliases much more comfortable:

    alias.st=status
    alias.co=checkout
    alias.com=checkout master
    alias.cam=commit -a -m
    alias.cm=commit -m
    alias.br=branch
push, pull, merge, rebase and the rest are infrequently used, so I don't alias them at all. Using shell aliases (as opposed to git aliases) is unjustified IMO, as is the horrible

    alias g='git'
which gives me the creeps.
Re:Working with git? These aliases will save you hours by sanderjd on Friday May 20, 2011 @10:31AM (#2567788)
Why do shell aliases make you uncomfortable? If we are talking about your personal machine, and not a server where another user can be bitten by not understanding your personal alias preferences, what could the harm be?
Re:Working with git? These aliases will save you hours by basman on Friday May 20, 2011 @11:53AM (#2568169)
I use the g=git alias :) Are there any negative consequences I should be aware of?
Re:Working with git? These aliases will save you hours by Terhorst on Friday May 20, 2011 @03:15PM (#2569040)
Tab-completion via git-completion.bash won't work. I think you can add the following at the end of git-completion.bash to fix it, though:

  complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null \
    || complete -o default -o nospace -F _git g
Re:Working with git? These aliases will save you hours by philwelch on Friday May 20, 2011 @05:20PM (#2569465)
Tab-completion on my zsh setup still works. I'm not sure why.
Re:Working with git? These aliases will save you hours by Pistos2 on Friday May 20, 2011 @05:07PM (#2569430)
I quite agree. Here are my git aliases:

        stat = status
        stta = status
        satt = status
        tat = status
        co = checkout
        fo = fetch origin
        ff = merge --ff-only
        ffo = merge --ff-only @{u}
        po = push origin HEAD
Re:Working with git? These aliases will save you hours by pdelgallego on Friday May 20, 2011 @09:34AM (#2567559)
just another one

alias grm="git status | grep deleted | awk '{print \$3}' | xargs git rm"

Re:Working with git? These aliases will save you hours by bronson on Friday May 20, 2011 @12:08PM (#2568231)
I have a similar thing in my .gitconfig:

    [alias]
      rm-a  = "!git ls-files -z --deleted | xargs -0 git rm"
Re:Working with git? These aliases will save you hours by Peaker on Friday May 20, 2011 @08:04PM (#2569855)
Why not add -u?
Re:Working with git? These aliases will save you hours by sid0 on Friday May 20, 2011 @02:09PM (#2568824)
Mercurial accepts unique prefixes to commands by default. (For example, hg me is the same as hg merge.) Hg wins again!