Table of Contents
10 Useful Git Commands
Here at GeekBitZone we use extensively Git as our version control system. As a matter of fact, even our statically generated website is under Git’s version control. Below are ten useful commands that we use on a daily basis.
git commit —amend
$ git commit —amend
git fetch —prune
$ git fetch —prune
git branch -vv
$ git branch -vv
git reset —hard origin/<branch>
$ git reset —hard origin/mybranch
git fetch origin
command first.
git branch -D <branch>
$ git branch -D mybranch
git branch -d <branch>
command can also be used,
provided that there are no un-merged changes left in the branch.
git push —delete origin <branch>
$ git push —delete origin mybranch
git branch -m <name>
$ git branch -m mynewname
git rebase -i HEAD~<n>
$ git rebase -i HEAD~3
git stash
$ git stash
git stash pop
$ git stash pop
Summary
These are GeekBitZone’s ten favourite Git commands. Which ones do You use on a daily basis?
Do let us know by posting your comments below.
See Also

How to access a Plex Server behind CGNAT with ngrok

10 Influential Pixel Artists

How to customise the bash prompt

Merge and Rebase in Git

How to add new PDF compression filters for the Preview tool on Mac

How to create PDFs with the Preview tool on Mac

How to install Homebrew for Mac

How to find out which shell I am running?

Syncing files with lftp

How to mirror drives with rsync
comments powered by Disqus
See also
- How to access a Plex Server behind CGNAT with ngrok
- 10 Influential Pixel Artists
- How to customise the bash prompt
- Merge and Rebase in Git
- How to add new PDF compression filters for the Preview tool on Mac
- How to create PDFs with the Preview tool on Mac
- How to install Homebrew for Mac
- How to find out which shell I am running?
- Syncing files with lftp
- How to mirror drives with rsync