This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
software:git [2010/12/10 03:57] tjhoban |
software:git [2011/01/31 08:37] tjhoban |
||
---|---|---|---|
Line 6: | Line 6: | ||
The quick version: | The quick version: | ||
- | pull changes down from the central repository (do this before making your own work.): | + | pull changes down from the central repository (do this before starting your own work.): |
- | git pull origin master | + | ><code<>git pull origin master</code> |
Add a file: | Add a file: | ||
Line 16: | Line 16: | ||
remove a file: | remove a file: | ||
- | git rm <filename/directory> | + | <code>git rm <filename/directory></code> |
+ | |||
+ | See what changes have been made to the codebase: | ||
+ | |||
+ | <code>git status</code> | ||
commit some changes: | commit some changes: | ||
- | git commit -m "commit message" <files/directories> | + | <code>git commit -m "commit message" <files/directories></code> |
Push committed changes up to the central repository (do this after you've finished): | Push committed changes up to the central repository (do this after you've finished): | ||
- | git push origin master | + | <code>git push origin master</code> |
See how you've changed a file: | See how you've changed a file: | ||
- | git diff <filename> | + | <code>git diff <filename></code> |
+ | |||
+ | Sometimes (rarely) a repository will get confused. You will see errors like: | ||
+ | |||
+ | <code>error: unable to create temporary sha1 filename .git/objects/95: File exists</code> | ||
+ | |||
+ | This can be corrected by either "chown -R prog .git", or by the commands: | ||
+ | |||
+ | <code> | ||
+ | git fsck | ||
+ | git prune | ||
+ | git repack | ||
+ | git fsck | ||
+ | </code> | ||
- | See what changes have been made to the codebase: | ||
- | git status |