63

Learning git (command line) finally

Comments
  • 2
    my thesis advisor shared this alias with me

    alias gl="git log --pretty=format:'%Cred%h %Cgreen%ad %Cblue%aN %Creset%s' --date=iso --graph --branches"

    It's the shit! Here are mine which I use daily!

    alias gall="git add --all"

    alias ga="git add"

    alias gs="git status"

    alias gb="git branch -a"

    alias gco="git checkout"

    alias gc="git commit"

    alias gp="git push"

    hope it helps!
  • 1
    @polaroidkidd

    Nice ones. I use Git's own alias system. Some of mine (I'm not sure the syntax is entirely correct, I'm writing it by heart):

    git fp = git fetch --prune
    git aa = git add .
    git ds = git diff --staged
    git rh = git reset HEAD
    git l1 = git log -1
    git lo = git log --oneline
  • 3
    My favorite one (=

    # commit & push pending changes to current

    # branch and quote all args as message

    function lgit() {

    git add .

    git commit -a -m "$1"

    git push origin "$(git symbolic-ref HEAD 2>/dev/null)"

    }

    ex. lgit "Add foo"
  • 0
    @millido Light side? But I use dark themes to protect my eyes and for personal preference (and still working grave yard shift) -- So which side is it really? 🤔 😁

    And I guess the real question is where are the cookies? 🍪🍪🍪
  • 1
    @eeee I hear ya. I just got sick of typing "git" all the time ^^
Add Comment