After giving up, do/do, both can be done. Give up doing sth. Give up before things start. Give up doing sth. I didn't give up until halfway. I gave up. "verb+vice" phrase, so when give up is used with pronouns, pronouns should be placed in the middle.
Usage of giving up
1, give up surrender: give up; Give it up.
Give up someone's hope for someone's arrival (or recovery, whether it can be found, etc.) ).
3. Give up something and stop; Abort: give up; Give up.
Give up sth. ...
5. Surrender to yourself /sbup(tosb); Surrender: Surrender.
Examples of giving up doing.
Sometimes, we fight for rights, but we give up being ourselves.
Sometimes, we give up being ourselves for the sake of rights.
Because the exam is imminent, I have to give up doing sports.
As the exam is imminent, I have to give up exercise.