Useful Git Commands List
Useful Git Commands List
Command Description
git init-----------------------------------------------------------Initialize a
local Git repository
git branch -a
------------------------------------------------------------------------List
all branches (local and remote)
git stash
-----------------------------------------------------------------------------
Stash changes in a dirty working directory
git stash
clear------------------------------------------------------------------------------
Remove all stashed entries
git
pull-------------------------------------------------------------------------------
--------Update local repository to the newest commit
git log
-----------------------------------------------------------------------------
-----------View changes
git log --
summary----------------------------------------------------------------------------
----View changes (detailed)
git log --
oneline----------------------------------------------------------------------------
---View changes (briefly)
git revert
commitid---------------------------------------------------------------------------
---Revert commit changes