  For a congruence subgroup $\Gamma$, we define the notion of
$\Gamma$-equivalence on binary quadratic forms which is the same as proper
equivalence if $\Gamma = \mathrm{SL}_2(\mathbb Z)$. We develop a theory on
$\Gamma$-equivalence such as the finiteness of $\Gamma$-reduced forms, the
isomorphism between $\Gamma_0(N)$-form class group and the ideal class group,
$N$-representation of integers, and $N$-genus of binary quadratic forms. As an
application, we deal with representations of integers by binary quadratic forms
under certain congruence condition on variables.
