Skip to content

Create alias for making pull requests

Jason Cheong-Kee-You edited this page Mar 25, 2025 · 6 revisions
  1. Install hub:

    brew install gh
    
  2. Create a github personal access token:

    1. Go here:

      https://github.com/settings/tokens

    2. Generate a new token with 'repo' and 'workflow' rights.

  3. Set the GITHUB_TOKEN environment variable in your shell config (e.g. ~/.zshrc):

    export GITHUB_TOKEN=<your-github-access-token>
    
  4. Run this on the command line:

    git remote set-head origin main
    
  5. Add this lines to your shell config (e.g. ~/.zshrc):

    alias mkpr='vwpr'
    alias vwpr='gh pr view --web > /dev/null 2>&1 || gh pr create -f --body ""'
    
    
Clone this wiki locally