Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 707 Bytes

File metadata and controls

56 lines (40 loc) · 707 Bytes
  • Show commit log history
git log
  • Show which file git is tracking and are stagged/unstagged
git status
  • Stage a file
git add [file-name]
  • Make the repo chnages according to that commit
git reset [commit-hash]
  • Change the date and time of last commit
git commit --amend --date="YYYY-MM-DD HH:MM:SS
  • Remove/reset all the commits
git update-ref -d HEAD
  • Check the git config
git config --list
  • Create a new brach
git branch <branch-name>
  • Checkout a branch
git checkout <branch-name>
  • Create and Checkout branch with a single command
git checkout -b <branch-name>