Randy
Randy

Reputation: 4525

Will pushing an old commit overwrite more recent already pushed commits?

Hi there,

I don't know if the title is clear enough... I have made a commit a few days ago and I forgot to push it. Since then, I have made other commits and I pushed them. Now, I want to push the old commit but I am afraid it would overwrite my most recent commits.

I mean, let's say, in the old commit, I have modified the method 'myMethod:'. In an other commit I modified this method again, and that's the version I want to keep. What will happen if I now push the first commit ? Will this method be "reset" ?

Upvotes: 0

Views: 68

Answers (1)

hinneLinks
hinneLinks

Reputation: 3736

Push will just transfer all your commits (that happened since the last push/pull operation), in the proper sequence, to the other Repository, nothing will get overwritten.

Upvotes: 1

Related Questions