Hacker News new | past | comments | ask | show | jobs | submit login

I find myself using these aliases regularly:

    df = diff --color --color-words --abbrev
    st = status -s
    l = log --graph --pretty=oneline --abbrev-commig --decorate
There are a lot more at this stackoverflow thread: http://superuser.com/questions/169695/what-are-your-favorite...



`git df' sounds like it should tell me how much space is free on all remote mirrors of the repo.

Is there a `git du' ?


Yes, there is: du .git


Is there anyway to get the short git status but still get the output that says "Your branch is ahead of 'origin/master' by 6 commits."


status -sb


Awesome thanks!


From my .gitconfig:

    # --- LOGS ---
    ll   = "log --pretty=oneline --abbrev-commit"
    lg   = log --pretty=oneline --abbrev-commit --graph --decorate --date=relative
    lgt  = log --graph --pretty=format:'%Cred%h%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
    lgtt = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
I almost never user "git lgt" or "git lgtt." Instead I mostly use "git ll", and sometimes "git lg", though if you're doing a lot of merging around, the graph can get a bit convoluted.


Is there a way to make the filenames in a 'git diff' stand out/coloured? I always have trouble figuring out where one file's diff ends and the next one begins.


  git diff --color
Or modify ~.gitconfig:

  [color]
  diff = auto

  [color "diff"]
    meta = yellow bold
    frag = magenta bold
    old = red bold
    new = green bold


My favorite: git diff --color-words=.


What's the difference between 'git diff --color-words' and what you posted?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: