Force Push in Git - Everything You Need to Know
We have all been there — you’re ready to transfer your work from your local repository to a remote repo, only to realize that the trusted git push command is not doing the job.
You may have heard about the --force flag command before, and maybe that...
tower.hashnode.dev7 min read
ProfOnestone
c# and beyond
Hey there just had to use
git push -fa few day ago.A colleague and I wanted to sync up a little repo we started a while ago. In the beginning we both added a .gitignore locally and one of us pushed that change upon creation of the repo.
As we wanted to sync up git refused due to inconsistency in the history of the repo. As we were both sure what we were doing one of us force pushed and the other pulled all the changes.
So as you described in 4. , if you and your team are sure which repo to push, it's absolutely fine to use it.