2019-08-08-zsh-git-commands
ggpush
is equivalent to
git push origin currentBranchggpull
is equivalent to
git pull origin currentBranchggpull someBranch
is equivalent to
git pull origin someBranchIt pulls someBranch to and merges to local currentBranch.
gco someBranch
is equivalent to
git checkout someBranchgco .
is equivalent to
git checkout .It checkouts latest commit in current branch.
It is used to undo/remove your local changes.
Warning: all your local changes would be lost.
gd
is equivalent to
git diffTo show current changes in terminal.
gd someRevNo / gd someBranch
To show difference between current head and given reference
gcb someNewBranch
is equivalent to
git checkout branch someNewBranchI use it to create a new branch
gcl someRepoURL
is equivalent to
git clone someRepoURLTo clone repository locally
gaa
is equivalent to
git add --allgcmsg someText
is equivalent to
git commit -m someTextglog
is equivalent to
git log --oneline --decorate --graphTo see logs of commit with lines
gss
is equivalent to
git statusTo see list of files with changes
gcam someMessage
is equivalent to
git commit -a -mAdd all changes and commit with a message
Last updated
Was this helpful?