nitty gritty internals. The porcelain is roughly what you would expect to
be exposed to as a user of the ``git`` command-like tool.
-Dulwich has a fairly complete plumbing implementation, and only a somewhat
-smaller porcelain implementation. The porcelain code lives in
-``dulwich.porcelain``. For the large part, this tutorial introduces you to the
-internal concepts of Git and the main plumbing parts of Dulwich.
+Dulwich has a fairly complete plumbing implementation, and a more recently
+added porcelain implementation. The porcelain code lives in
+``dulwich.porcelain``.
+
+
+For the large part, this tutorial introduces you to the internal concepts of
+Git and the main plumbing parts of Dulwich. The last chapter covers
+the porcelain.
--- /dev/null
+Porcelain
+=========
+
+The ``porcelain'' is the higher level interface, built on top of the lower
+level implementation covered in previous chapters of this tutorial. The
+``dulwich.porcelain'' module in Dulwich is aimed to closely resemble
+the Git command-line API that you are familiar with.
+
+Basic concepts
+--------------
+The porcelain operations are implemented as top-level functions in the
+``dulwich.porcelain'' module. Most arguments can either be strings or
+more complex Dulwich objects; e.g. a repository argument will either take
+a string with a path to the repository or an instance of a ``Repo`` object.
+
+Initializing a new repository
+-----------------------------
+
+ >>> from dulwich import porcelain
+
+ >>> repo = porcelain.init("myrepo")
+
+Clone a repository
+------------------
+
+ >>> porcelain.clone("git://github.com/jelmer/dulwich", "dulwich-clone")
+
+Commit changes
+--------------
+
+ >>> r = porcelain.init("testrepo")
+ >>> open("testrepo/testfile", "w").write("data")
+ >>> porcelain.add(r, "testrepo/testfile")
+ >>> porcelain.commit(r, "A sample commit")