要做出改变,你首先要戴上你的程序员的帽子,做你一直都在做的事情。我真的不能帮你:-)
接下来,你会想提交你的更改。要提交,只需说:
$ git commit -a # -a means "automatically stage all changed files git knows about"
并在提示符处键入描述性消息。请注意,在git中的“提交”确实是而不是公开您的更改。它只是承诺你的本地版本库;直到你将来没有人看到它,直到你git push
。
合并更改进入您的存储库拷贝其他人:
$ git pull
如果你有到存储库的直接访问,可以使git commit
是你做早期可与公众:
$ git push
否则,您可以将您提交转换成补丁并将它们发送到你的友好的维护者:
$ git log
commit 75b17eeca0394e27759acf2f6b039851a5a28f98
Author: Your Name
Date: Tue Aug 10 01:10:19 2010 -0400
Did something wonderful.
commit f9f677a465a5746874dc2f2c86cc444ffa28a020
Author: Your Name
Date: Fri Aug 6 04:06:01 2010 -0400
Fixed a horrible horrible error of mine.
$ git show 75b17eeca0394e27759acf2f6b039851a5a28f98 > wonderful.diff
$ git show f9f677a465a5746874dc2f2c86cc444ffa28a020 > fix.diff
最后,如果你想新的文件添加到资料库,说:
git add foo.html # don't forget to git commit -a like you would any change
要删除的文件,你可以简单地删除它们就像你通常会(与rm
shell命令),然后git commit -a
变化。