Replace 'value' with yours.
# GIT clone repo
git clone 'git repo'
# GIT remote information
git remote -v
# GIT commit
git commit -m 'comment'
# GIT checkout
git checkout -b 'branchname'
# GIT checkout from remote
git checkout -b 'branchname' origin/'branchname'
# GIT checkout branch with tag
git checkout -b 'branchname' 'tag_name'
# GIT create branch
git branch 'branchname'
# GIT list branches
git branch
# GIT list tag
git tag
# GIT create tag
git tag -a 'tag number' -m 'comment'
# GIT remove local tag
git tag -d 'tag number'
# GIT remove remote tag
git push 'remote repo' :refs/tags/'tag number'
# GIT push
git push 'remote repo' 'local branch':'remote branch'
# GIT push tags to remote
git push 'remote repo' --tags //e.g., git push origin --tags
# GIT merge
git merge 'from branch'
If you want to revert changes made to your working copy, do this:
git checkout .
If you want to revert changes made to the index (i.e., that you have added), do this:
git reset
If you want to revert a change that you have committed, do this:
git revert ...
add changes including deletion, etc.
git add -u
Remove added changes
git rm -r --cached .
=================================================
Add command alias to git in '.gitconfig'
file in your$HOME
directory.
Getting hashes for the previous versions