Jump to content

GIT Cheat Sheet: Difference between revisions

From tmplab
Phil (talk | contribs)
Phil (talk | contribs)
Line 14: Line 14:
== Seeing changes ==
== Seeing changes ==
  git log
  git log
== Tagging ==
Adding a tag
git tag <tagname> -m "Comment about this tag"
Listing tags with comments
git tag -n


== Seeing files inside repository ==
== Seeing files inside repository ==

Revision as of 18:50, 20 January 2009

Basic commands

Creating

git init

Adding files

git add <filename>

or to commit all files in current directory:

git add .

Committing changes

git commit -m <message>

Seeing changes

git log

Tagging

Adding a tag

git tag <tagname> -m "Comment about this tag"

Listing tags with comments

git tag -n

Seeing files inside repository

git ls-files
git ls-tree HEAD

References