Place the ricotta in a bowl lined with two layers of cheese cloth. Gather the edges of the cheese cloth together to form a bundle. Squeeze the bundle to force out any excess moisture in the cheese.
Once the cheese has expelled most of it's moisture, transfer it to a large bowl. Add the garlic, egg, parmesan, salt and pepper and stir to combine.
Start introducing the flour to the cheese mixture in 1/4 cup increments while stirring constantly. When a soft dough begins to form, transfer it to an extremely well-floured surface. Knead the dough, continuously, adding more flour, until the dough is firm enough to shape. Don't add too much flour or the dough will be tough. You want the dough to still be soft, so use a light hand.
Divide the dough into 8 sections. Roll each of sections out into long snakes. Using a bench scraper, cut the snakes into a series of little pillow-like shapes about a 1/2 an inch wide. Transfer the gnocchi to a well-floured baking sheet and continue with each remaining sections.
When the gnocchi is cut, bring a large pot of water to a boil. Salt the water liberally and add the gnocchi. Cook the gnocchi until it floats to the surface, about 3 minutes.
Drain and rinse the gnocchi in hot water.