Reputation: 130
It’s my separate feature branch on our remote repository. I needed to delete a file so I force push my most recent change (deleting the file).
From my understanding; this doesn’t affect the main branch, since it’s just my branch. Just needed a confirmation?
Upvotes: 1
Views: 1495
Reputation: 1323203
From my understanding; this doesn’t effect the main branch, since it’s just my branch.
Force pushing one's branch would not affect other branches on the remote repository.
It would only affect others working on the same feature branch, as they would need to reset their local branch to the new remote one.
But in your case, deleting a file should not involve a git push --force
.
A simple git rm -- aFile
+ git push
is enough.
Upvotes: 3