Activity Team: Difference between revisions
| Line 41: | Line 41: | ||
===General overview of git=== | ===General overview of git=== | ||
Read this brief overview and then '''start''' with James Cameron's [[Activity Team/Git Tutorial|git tutorial]]. | |||
====Setup (once per machine you're working on):==== | |||
git clone git://git.sugarlabs.org/whatever/mainline.git whatever | |||
====Regular usage:==== | |||
cd whatever | |||
[hack away and test your changes] | |||
git diff | |||
[review your changes, go back to hacking if you notice a mistake] | |||
git status | |||
git add NameOfNewFile # if you created any file you want included | |||
git commit -a | |||
[describe your changes - by convention the first line is a summary and the remaining lines are long description] | |||
[start again at hacking if you're offline] | |||
git log origin/master..master # shows you all commits not pushed yet | |||
git push # if/once you are online | |||
Git offers a lot more commands and features that can make your life | |||
easier, but it's best to start off small and use only those mentioned | |||
above. It's very easy to get confused if you're unfamiliar with git. | |||
Even if you use the more advanced features, git does a pretty good job at | |||
allowing you to recover from your mistakes. | |||
So if you ever mess up and don't know how to fix it yourself, please | |||
stop (at least for me that's usually the hardest part ;) ), try to | |||
recollect the exact sequence of actions (e.g. from shell history) and ask | |||
for help. | |||
---- | |||
Once you have [[Activity Team/How_to_migrate_from_OLPC|migrated]] your project, you may have some more detailed [[Activity Team/Git FAQ|questions regarding how Sugar Labs uses git]], particularly in regard to patch management. | Once you have [[Activity Team/How_to_migrate_from_OLPC|migrated]] your project, you may have some more detailed [[Activity Team/Git FAQ|questions regarding how Sugar Labs uses git]], particularly in regard to patch management. | ||