You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

94 lines
2.7 KiB

  1. SCM
  2. ===
  3. - anonymous checkouts
  4. $ git clone git://git.freedesktop.org/git/PolicyKit.git
  5. - checkouts if you got an ssh account on fd.o (username@ is optional)
  6. $ git clone ssh://[username@]git.freedesktop.org/git/PolicyKit.git
  7. - commit to local repository
  8. $ git commit -a
  9. - push local repository to master repository at fd.o (remember most patches
  10. requires review at the mailing list)
  11. $ git push
  12. - pull changes from master repository at fd.o
  13. $ git pull
  14. - diff of working tree versus local repository
  15. $ git diff
  16. - diff of local repository vs. master repository at fd.o
  17. synchronize with upstream repo:
  18. $ git pull
  19. (possibly merge changes)
  20. generate the diff:
  21. $ git diff origin HEAD
  22. - influential environment variables (set these in e.g. .bash_profile)
  23. export GIT_AUTHOR_NAME='Your Full Name'
  24. export GIT_COMMITTER_NAME='Your Full Name'
  25. export GIT_COMMITTER_EMAIL=youremail@domain.net
  26. export GIT_AUTHOR_EMAIL=youremail@domain.net
  27. - see also
  28. http://www.kernel.org/pub/software/scm/git/docs/
  29. Committing code
  30. ===
  31. - Commit messages should be of the form (the five lines between the
  32. lines starting with ===)
  33. === begin example commit ===
  34. short explanation of the commit
  35. Longer explanation explaining exactly what's changed, whether any
  36. external or private interfaces changed, what bugs were fixed (with bug
  37. tracker reference if applicable) and so forth. Be concise but not too brief.
  38. === end example commit ===
  39. - Always add a brief description of the commit to the _first_ line of
  40. the commit and terminate by two newlines (it will work without the
  41. second newline, but that is not nice for the interfaces).
  42. - First line (the brief description) must only be one sentence and
  43. must not start with a capital letter. Don't use a trailing period
  44. either.
  45. - The main description (the body) is normal prose and should use normal
  46. punctuation and capital letters where appropriate. Normally, for patches
  47. sent to a mailing list it's copied from there.
  48. - When committing code on behalf of others use the --author option, e.g.
  49. git commit -a --author "Joe Coder <joe@coder.org>"
  50. Coding Style
  51. ===
  52. - Please follow the coding style already used.
  53. - Write docs for all functions and structs and so on. We use gtkdoc format.
  54. - All external interfaces (network protocols, file formats, etc.)
  55. should have documented specifications sufficient to allow an
  56. alternative implementation to be written. Our implementation should
  57. be strict about specification compliance (should not for example
  58. heuristically parse a file and accept not-well-formed
  59. data). Avoiding heuristics is also important for security reasons;
  60. if it looks funny, ignore it (or exit, or disconnect).