March 03, 2020

Alias git to pull current branch

Key Takeaways

Alias git to pull current branch Git 2.22 onwards has a current branch flag, with git branch —show-current allows you to see which brach you are at now, sometim...

Alias git to pull current branch
Git 2.22 onwards has a current branch flag, with git branch —show-current allows you to see which brach you are at now, sometime you want to pull current branch changes, and the easiest config in my opinion is to set a alias in your bash_profile or zshrc without messing your git config settings.

alias gp=“git pull origin $(git branch —show-current)”

now you just need to type gp, it will pull your current branch origin.

This can be quite useful for many other things, for example I am also using it to bind to git reflog

alias rlog=“git reflog $(git branch —show-current)”

Hope you enjoy this kind of git binding.

Update: Please make sure that you use single quote intead of double quote for this alias, or else zsh will prompt you if there are not git repo in this folder when you start zsh.

alias gp='git pull origin $(git branch —show-current)'

Vibe Code to Glory - Side Projects 2026

AI Banana Flow

Web App

Check out this project

AI Banana Flow is an AI Image Generator with Visual Flow Editor. It allows users to create stunning AI-generated images through an intuitive visual flow editor. Connect prompts, generate images, and build creative workflows with the power of AI. Experience a new paradigm of creative freedom with precision control and visual workflow management.

Category: AI Image Generation

AI Banana Flow - AI Image Generation Web application by Max Li Bin

AI Banana Flow

Web

SG Passport Photo - Utility Web application by Max Li Bin

SG Passport Photo

Web

MyPhotoAI - Photography iOS application by Max Li Bin

MyPhotoAI

iOS

Interior AI: Room Designer - Design iOS application by Max Li Bin

Interior AI: Room Designer

iOS