Reset OR Squash Changes from Remote Git Directory, already Pushed
Use Case
Suppose this was our squash merge commit. We added test.txt and pushed this changes. Now. We have troubles in this file. Now we have to remove this from develop branch
How this is feasible
GIT REVERT - This will not rewrite your history. In fact it will create a new history for you.
- in DevOps > Repos > Commit
- Come down to that commit, if you want to remove there is a three dot at the right hand > click Revert
- Now a branch is created on basis of that commit
- On Clicking Revert button a new PR is created
- Create this PR
- Complete this PR
- Click Complete Merge
- Check your commits on Branch develop
- A new commit this created
- click on this commit
- we can see our file will be removed
GIT RESET - basically rewrite your history.