Skip to content

dhruwlalan/git-alias

Repository files navigation

git-alias

Declarative & human-friendly aliases for commonly used git commands.

https://gitalias.netlify.app/

Install

Visit here & download the file gitconfig.txt or you can just view gitconfig.txt then copy all the alias and paste it in your .gitconfig under the alias section.

If you can't locate your .gitconfig, checkout this Stack Overflow link.

Few Examples:

# check status or repo (git status): $ git st # directly push commit to github (git add + git commit + git push): $ git dctp 'commit-message' # Sync local repository with remote repository (git fetch + git pull): $ git sync # push local branch to github: $ git push-lb <local-branch-name> # show graph of commits: $ git graph # Plus many more...

↗Checkout full list of aliases with their syntax

Note:

The default remote of all aliases is set to origin. So if you want to use a different remote you will have to manually specify the different remote.
Example: (using default remote origin)

# adding a remote: $ git add-remote <your-remote-url> # checking remotes: $ git remote-url origin <your-remote-url> (fetch) origin <your-remote-url> (push)

Example: (using a remote other than origin)

# adding a remote other than origin: $ git add-remote upstream <your-upstream-url> # checking remotes: $ git remote-url upstream <your-upstream-url> (fetch) upstream <your-upstream-url> (push)

About

Declarative & human-friendly aliases for commonly used git commands.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •