Preheat your oven to 375°F (190°C). Grease a 9x9-inch baking dish or casserole dish.
Prepare the Potatoes:
Shred the baked and cooled potatoes into a large bowl. Be gentle to avoid mashing them.
Mix the Ingredients:
Add the sour cream, grated onion, shredded cheddar cheese, garlic (if using), salt, and black pepper to the shredded potatoes. Gently fold the ingredients together until combined.
Assemble the Dish:
Transfer the potato mixture into the greased baking dish. Spread it evenly and drizzle the melted butter over the top.
Bake:
Bake in the preheated oven for 30-35 minutes, or until the top is golden and bubbly.
Garnish and Serve:
Sprinkle chopped chives over the baked potatoes before serving.