Difference between revisions of "GIT Cheat Sheet"

From Tmplab
(Committing changes)
Line 15: Line 15:
 
  git log
 
  git log
  
 +
== Seeing files inside repository ==
 +
git ls-files
 +
git ls-tree HEAD
  
 
= References =
 
= References =
 
* Good guide: http://www.sourcemage.org/Git_Guide
 
* Good guide: http://www.sourcemage.org/Git_Guide
 
* Another good one: http://toolmantim.com/article/2007/12/5/setting_up_a_new_rails_app_with_git
 
* Another good one: http://toolmantim.com/article/2007/12/5/setting_up_a_new_rails_app_with_git

Revision as of 13:32, 17 October 2008

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

Seeing files inside repository

git ls-files
git ls-tree HEAD

References