Regarding the repercussions of git hard reset on remote

  Kiến thức lập trình

Resetting remote to a certain commit

We would like to reset the remote to a certain commit on a specific branch (say branch A) in our project. However there are the following concerns:

  • We recently did a merge onto the branch A from origin, in order to make it current (this merge is the latest in the commit history of the branch)
  • Another branch B has been created from branch A after the merge, and all the changes have been pushed to the remote; the idea is that we would have all the original commits from A on B, even if we were to hard reset A to a previous commit

Is this understanding correct? Would we still have all the original commits on A still available on B even after we do a hard reset on A to a previous commit? This question stems from the fact that B has been branched off of A to begin with.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT