Skip to content

Instantly share code, notes, and snippets.

@juanbrujo
Last active July 24, 2025 08:41
Show Gist options
  • Save juanbrujo/22a6a3916b0894a4b30c45d8380b1808 to your computer and use it in GitHub Desktop.
Save juanbrujo/22a6a3916b0894a4b30c45d8380b1808 to your computer and use it in GitHub Desktop.

Revisions

  1. juanbrujo revised this gist May 4, 2023. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,13 @@
    # Git aliases
    alias gitd="git diff -- ':!package-lock.json' ':!yarn.lock'"
    alias gitc='git checkout development'
    alias gits='git status'

    # Will return the current branch name
    # Usage example: git pull origin $(current_branch)
    function current_branch() {
    ref=$(git symbolic-ref HEAD 2> /dev/null) || return
    echo ${ref#refs/heads/}
    }

    alias gitp='git pull origin $(current_branch)'
    alias gitc='git checkout development'
    alias gits='git status'
  2. juanbrujo created this gist May 4, 2023.
    12 changes: 12 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    # Git aliases
    alias gitd="git diff -- ':!package-lock.json' ':!yarn.lock'"

    # Will return the current branch name
    # Usage example: git pull origin $(current_branch)
    function current_branch() {
    ref=$(git symbolic-ref HEAD 2> /dev/null) || return
    echo ${ref#refs/heads/}
    }
    alias gitp='git pull origin $(current_branch)'
    alias gitc='git checkout development'
    alias gits='git status'