Changes between Version 1 and Version 2 of GitCookbook

Show
Ignore:
Timestamp:
09/09/09 00:05:37 (12 years ago)
Author:
dukeleto
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GitCookbook

    v1 v2  
    11= checkout = 
    22 
     3To check out a repo: 
     4 
     5{{{ git checkout git://github.com/leto/parrot.git }}} 
     6 
     7There should now be a directory called "parrot" in your current directory. 
     8 
    39= commit = 
     10 
     11Next we modify a file so we can commit a change: 
     12 
     13{{{ echo "Some junk" >> README }}} 
     14 
     15To see a list of modifies files: 
     16 
     17{{{ git status }}} 
     18 
     19should produce something like 
     20 
     21{{{ 
     22# On branch master 
     23# Changed but not updated: 
     24#   (use "git add <file>..." to update what will be committed) 
     25#   (use "git checkout -- <file>..." to discard changes in working directory) 
     26# 
     27#       modified:   README 
     28# 
     29 
     30}}} 
     31 
     32To commit all local changes: 
     33{{{ 
     34git commit -a -m "I did some stuff" 
     35}}} 
     36 
     37If you had multiple changed files that you wanted to commit seperately, you would do  
     38{{{ 
     39git add README 
     40git commit -m "I commit stuff" 
     41}}} 
     42LESSON: Git only commits files you have added already. The -a flag lets you be lazy and say "go ahead and add all modified files" when you are commiting. 
    443 
    544= update =