Difference between revisions of "Git for dummies"

From FreekiWiki
Jump to navigation Jump to search
(New page: Get a copy of the ''library'' project: git clone devo:/git/library cd library/ Sort of like svn update: git pull Like svn update (but if you have local commits): git fetch git ...)
 
Line 27: Line 27:
 
Now send your locally committed changes to the main repository:
 
Now send your locally committed changes to the main repository:
 
   git push
 
   git push
 +
 +
 +
[[Category: Coders]]

Revision as of 19:57, 15 November 2008

Get a copy of the library project:

 git clone devo:/git/library
 cd library/

Sort of like svn update:

 git pull

Like svn update (but if you have local commits):

 git fetch
 git rebase origin/master

Now edit a file

 vi TODO 

Now schedule this modification to be committed locally:

 git add TODO 

Want to see changes that you hain't yet git added?

 git diff

Want to see what you are about to commit?

 git diff --cached

Now commit it locally:

 git commit

Now send your locally committed changes to the main repository:

 git push