If your lines are too long, a clove hitch can be tied in the middle of your dock line by making two large loops, then dropping them over the dock post. Clove hitches can loosen with wave action, so adding half-hitches is a good idea.
The clove hitch can also jam forever, so
never use a clove hitch on your vehicle's trailer hitch!
During Spring's worst windy day, my long-term-renter/neighbor's stern line released in their temporary absence, so their I/O was only inches away from our shoreline's boulders.

It was only through their otherwise useless tie-off-piling that their one remaining line held the boat. It was a severe angle, but kept it off the rocks. I ran over, and secured their boat using a
bowline. As though it was epoxied in place, they kept using that very same knot I'd tied for the rest of the season.
(Yes, I had to
mo-o-ove their boat).
• A one minute tutorial to tie the "King of Knots":
https://www.youtube.com/watch?v=hIdsTZTUl6E
The
bowline is a boater's strongest and most useful knot.
.