  We introduce a homotopy theory of digraphs (directed graphs) and prove its
basic properties, including the relations to the homology theory of digraphs
constructed by the authors in previous papers. In particular, we prove the
homotopy invariance of homologies of digraphs and the relation between the
fundamental group of the digraph and its first homology group.
  The category of (undirected) graphs can be identified by a natural way with a
full subcategory of digraphs. Thus we obtain also consistent homology and
homotopy theories for graphs. Note that the homotopy theory for graphs
coincides with the one constructed in the paper of Babson et.
