Skip to content

Instantly share code, notes, and snippets.

View addstar's full-sized avatar

add5tar addstar

  • Melbourne, Australia
  • 06:01 (UTC +10:00)
View GitHub Profile
@alchemistmatt
alchemistmatt / GitTips.md
Last active August 2, 2017 21:54
Table of git commands
Command Description Example
status See the status of files git status
add Add (stage) a file to a commit (file could be a new file, or already tracked by the repository) git add Subfolder\algorithm.cs
commit Commit staged files git commit -m "Commit message"
commit --amend Commit staged files, amending to the previous commit git commit --amend -m "Commit message"
log See the commit log. Commits are shown one page at a time, with the newest commit first. git log
log -L See changes to a specific range of code, through all commits git log -L 580,600:clsAlgorithm.cs
log --graph Draw a text-based graphical representation of the commit history, optionally specifying the branch to follow (master in this example) git log --graph --decorate --pretty=oneline --abbrev-commit master
git log --graph --decorate --pretty=medium--abbrev-commit master
log --stat Show log messages, names of updated files, and a