git

Revision as of 19:43, 22 June 2007 by 67.189.90.32 (talk)



Checkout

git clone <repo> name

Checks out a copy of repo into the named directory

git clone nimbus.aboutus.com:/opt/git/aboutus aboutus-1.10.0

you'll want to edit .git/info/exclude and add at least LocalSettings.php, don't know how we can get these transmitted automatically

Status

git status

Diff

git diff

Update

git pull

Commit

 git commit -a -m "commit message"

This will commit the changes to your local repository.

make *sure* you check status first, this will add all new files and commit them to your local repository.

If you don't want to use -a (probably a good idea) then run git add for each file you want to update before you run git commit.

Yes, that means that you have to git add a file every time you modify it, even if the file is already being tracked.

Push

git push origin

will push all commited patches you have on your local repository to the shared one you checked out from

Revert

for CVS style revert, i.e. to replace a fie with what it was before you changed it:

git diff filename | patch -R


Retrieved from "http://aboutus.com/index.php?title=git&oldid=7640463"