Difference between revisions of "Git for dummies"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | Get a copy of the ''library'' project: | + | Get a copy of the ''library'' project (assuming the central repository is on a server named ''devo''): |
git clone devo:/git/library | git clone devo:/git/library | ||
cd library/ | cd library/ | ||
Line 9: | Line 9: | ||
git fetch | git fetch | ||
git rebase origin/master | git rebase origin/master | ||
+ | (Master is like trunk is in svn.) | ||
Now edit a file | Now edit a file | ||
vi TODO | vi TODO | ||
+ | (See it's just like svn!!) | ||
Now schedule this modification to be committed locally: | Now schedule this modification to be committed locally: | ||
Line 28: | Line 30: | ||
git push | git push | ||
+ | |||
+ | http://git.or.cz/course/svn.html | ||
[[Category: Coders]] | [[Category: Coders]] |
Revision as of 19:01, 15 November 2008
Get a copy of the library project (assuming the central repository is on a server named devo):
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
(Master is like trunk is in svn.)
Now edit a file
vi TODO
(See it's just like svn!!)
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