How often you upgrade depends on a) what you're using the GPU for, & b) if it can play the games you want at the resolution, FPS and/or quality settings that you want.
As for going by "generation", that only works if your replacement card is an exact match for the prior-generation card you had. For example, my current rig started out with a Radeon HD 6450 (since it was a desktop for use by both myself & my wife, the "general usage" requirements came first, "gaming" came...well, probably 3rd in her mind). When I replaced with an R9 270, I was technically only going up about 1 1/2 generations (the 270 being just a rebranded 7870, & the 7000s were just a generation beyond the 6000s)... but I was going from a low-end budget GPU (one that was so low-powered, it only needed a heat sink instead of actual cooling fans) to a (for the time) mid-range card that used a PCIe power connector & needed 2 big fans to keep cool. In the same way, when I upgraded that to an R9 380, I was technically going up only a generation, I still ended up with a much better GPU.
In your case, going from the GTX 770 to the GTX 1060 is a solid upgrade. It's one of the best (if not the best) GPU for 1080p resolutions, & provides good performance at 1440p resolutions (it might not be able to handle Ultra for all games at 1440p, but it'll still perform well). If you're looking for higher resolutions, though, you might want to consider the 1070 (or even the 1080), provided they're in your budget.