dev-resources.site
for different kinds of informations.
Most commonly used Git command shortcuts
Published at
1/21/2024
Categories
git
github
gitcommands
beginners
Author
Amburi Roy
I often rely on a set of Git command shortcuts that are widely used and find them quite convenient. Admittedly, it took me some time initially to become accustomed to them.
List of shortcuts:
-
alias g='git'
β Simplifies the Git command as 'g'. -
alias gs='git status'
β Quickly check the current Git repository status. -
alias ga='git add'
β Prepares changes for the next commit. -
alias gaa='git add .'
β Adds all changes in the working directory to the staging area. -
alias gc='git commit -m'
β Commits changes with a specified commit message. -
alias gca='git commit -am'
β Adds and commits all changes in one step with a commit message. -
alias gco='git checkout'
β Switches to a different branch or commit. -
alias gcb='git checkout -b'
β Creates and switches to a new branch. -
alias gbd='git branch -d'
β Deletes a specified branch. -
alias gba='git branch -a'
β Lists all branches, including remote branches. -
alias gbr='git branch'
β Lists local branches. -
alias gpl='git pull'
β Fetches changes from a remote repository and merges them into the current branch. -
alias gph='git push'
β Pushes changes to the remote repository. -
alias gpho='git push origin'
β Pushes changes to the 'origin' remote repository. -
alias gl='git log --oneline'
β Displays a simplified log of commits. -
alias gla='git log --oneline --decorate --graph --all'
β Displays a detailed and graphical log of all commits.
Articles
12 articles in total
Scalability: Vertical, Horizontal, and Hybrid Scaling
read article
Cool Tool: ASDF β A single solution for managing versions
read article
Monolith, Microservices, Mono-Repo
read article
Most commonly used Git command shortcuts
currently reading
Does Status Code `405` occur during a `GET` request?
read article
Does Status Code `405` occur during a `GET` request?
read article
Design Principles
read article
π KISS (Keep It Simple, Stupid)
read article
YAGNI (You Aren't Gonna Need It)
read article
π§ΊΒ DRY (Donβt Repeat Yourself)
read article
πͺ¨Β SOLID Principles
read article
SOLID Principles: Dependency Inversion Principle (DIP)
read article
Featured ones: