My team has the repository stored in GitHub. If a file (file1) has been modified by developer1 (in local repo) and committed to remote repository. Now another person (developer2) modifies the same file in his local repo without syncing the latest from remote repo, the changes get committed to remote repo (force pushed). There is no warning from GitHub remote repository or the git client (we use Tortoise Git client or eGit). Please suggest if there is a way to prevent this by making any setting changes in remote repository or the git client.
Probably some settings in git hooks needed?
the changes get committed to remote repo (force pushed)
That only happens when whoever's doing the push goes out of their way to force it.
That's your problem: people deciding to explicitly overwrite work they didn't do.
In Git, you do
git config receive.denyNonFastForwards true
git config receive.denyDeletes true
(and there's lots more granularity available, see the git config docs) on the receiving end to stop people doing that to a repo.
GitHub doesn't allow direct access to that level of repository administration, they're a front-end. They call their flavoring "protected branches".