You should have waited and was subject to a 2-stroke penalty. Your fellow groupmember should have been given a 2 strokes penalty too for allowing you to do what you did (according to 13-2).
The proper action was to wait until everyone in your group had finished putting and than repair the spike marks.
Decision 1-2/0.7 says:
---8<-------------
...The provisions of Rule 1-2 do not prevent a player from taking acts that conform with the Etiquette Section, so long as the player does so for the sole purpose of caring for the course and without intentionally influencing the movement of a ball, or the physical conditions affecting play, of a player in the player's group or match. ...
---8<-------------