  The DArk Matter Particle Explorer (DAMPE), also known as Wukong in China,
launched on December 17, 2015, is a new high energy cosmic ray and {\gamma}-ray
satellite-borne observatory in space. One of the main scientific goals of DAMPE
is to observe GeV-TeV high energy {\gamma}-rays with accurate energy, angular,
and time resolution, to indirectly search for dark matter particles and for the
study of high energy astrophysics. Due to the comparatively higher fluxes of
charged cosmic rays with respect to {\gamma}-rays, it is challenging to
identify {\gamma}-rays with sufficiently high efficiency minimizing the amount
of charged cosmic ray contamination. In this work we present a method to
identify {\gamma}-rays in DAMPE data based on Monte Carlo simulations, using
the powerful electromagnetic/hadronic shower discrimination provided by the
calorimeter and the veto detection of charged particles provided by the plastic
scintillation detector. Monte Carlo simulations show that after this selection
the number of electrons and protons that contaminate the selected {\gamma}-ray
events at $\sim10$ GeV amounts to less than 1% of the selected sample. Finally,
we use flight data to verify the effectiveness of the method by highlighting
known {\gamma}-ray sources in the sky and by reconstructing preliminary light
curves of the Geminga pulsar.
