It's a good thing to let your manager take credit for your work--if you like them. If they don't, all they're left with is the blame when things go wrong. (I find it a little strange to see people in this thread saying they've had managers who successfully blamed everything on their subordinates: they must never have been managers, or worked at very strange companies. A manager generally gets a higher salary and some perks, but they are extremely dispensable if they don't produce results--it doesn't matter who's not producing them; it's their job to facilitate it.)
As long as they're not an asshole about it, and you enjoy working with them, you should do what you can to make your manager look good, otherwise you might get another one. Once your manager moves up the ranks or joins another company, they will invite you (why wouldn't they? You make them look good.)
As long as they're not an asshole about it, and you enjoy working with them, you should do what you can to make your manager look good, otherwise you might get another one. Once your manager moves up the ranks or joins another company, they will invite you (why wouldn't they? You make them look good.)