Skip to content

vhxnif/git-alias

Repository files navigation

alias

Some commonly used simplified git commands

Download dependencies:
bun install
Link to local
bun run link
Remove the link locally
bun run unlink
env
# editor
export EDITOR = 'vi'
# openai api
export ALIAS_BASE_URL = <base url>
export ALIAS_API_KEY = <api key>
export ALIAS_DEFAULT_MODEL = <default model>
# ollama
export ALIAS_OLLAMA_BASE_URL = <ollama url>
export ALIAS_OLLAMA_DEFAULT_MODEL = <default model>
export ALIAS_TYPE = 'ollama'

Git Alias

alias display

gps

git push

gpl

git pull

gh

Show core command mapping infomation.

gs

Display the output of git status in a table format.

gl

Display the output of git logs in a table format.

gc

Select changed files.
Generate commit message.
Execute git commit -m <message>.

gfa

Select changed files.
Execute git add <files> to stage the files.

gfd

Select staged files.
Execute git restore --staged <files> to unstaged files.

gfr

Select modified files.
Execute git checkout HEAD — <files> to revert selected files to HEAD.

gfc

Select a changed file. Execute git diff <file>.

gsl

Display the output of git stash list in a table format.

gsa

Stash changes with a message. git stash push -m <message>.

gss

Select a stage.
Execute git stash show -p <stash> to display detailed infomation.

gsp

Execute git stash pop.

gsu

Select a stage.
Execute git stash apply <stash> to apply the stash.

gsd

Select a stage.
Execute git stash drop <stash> to drop the stash.

gbn

Create a new branch or checkout from origin branch.
git switch -c <name> or git switch -t <name>

gbl

Display the output of git branch in a table format.

gbc

Search and selecet a branch.
Execute git switch <branch>.

gbm

Search and select a branch.
Execute git merge <branch>

gbr

Search and select a branch.
Execute git rebase <branch>

gbd

Search and select a branch.
Execute git branch -D <branch>.

gts

Show Tag Deatils.
Execute git show <tag>

About

Some commonly used simplified git commands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published