Last active
          July 24, 2025 08:41 
        
      - 
      
- 
        Save juanbrujo/22a6a3916b0894a4b30c45d8380b1808 to your computer and use it in GitHub Desktop. 
    Some useful Git aliases for ~/.zshrc
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 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)' | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
clean, practical utility for Gist comments slope