Question: I use Framework7 with Phonegap and tried to build a simplistic app. I followed the documentation from here <https://framework7.io/docs/routes.html> to define a custom route, which I further streamlined to just load an about page, but cannot get it to work. In both browser and Phonegap App the link to my custom route doesn't work.

Here's what I've got:

```
// Init App
var myApp = new Framework7({
routes: [
  {
  name: 'foobar',
  path: '/foobar/',
  url: './about.html',
  },
],

});

```

And:

```
<div class="page-content">
    <div class="content-block">
        <p>Page content goes here</p>
        <!-- Link to another page -->
        <a href="/foobar/">Test</a>
    </div>
</div>

```

But whenever I run the app, my custom route is not picked up by framework and the requests get 404 error. There are no substantial error in the console which may prevent the app from executing.

Is there any way to debug the routing in Framework7 and check if routes are correctly set?

Answer: 
> 
> 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](https://help.github.com/articles/about-protected-branches/)".
**UPDATE** - Question originally did not specify force push. This completely changes the answer (though not in a way the asker will likely appreciate); preserving the original answer for reference, because it is still the correct way to coordinate changes.

---

A force push specifically means that the person pushing wants to override the history. If this wasn't intended, then a force push should not have been used. Usually this combination of questions means that someone tried to push and, when they got an error that they needed to sync first, thought it sounded easier to force push.

Since force push means "I want to override history", git is not going to respond with a warning that you're about to override history.

You can use `--force-with-lease` instead of `--force`. This allows you to tell git specifically *what* you expect to override from the history, and git will fail the operation and warn you if the history you're *actually* overriding is different from that (i.e. because someone pushed something you didn't yet know about).

But that "added safety" still isn't enough for force pushes to belong in your day-to-day workflow. In 99.99999% of all cases, the better solution is to train your developers not to force push and to instead honor the error git gives on a regular push, which tells you exactly what needs to happen to sync your changes with those of your teammates.

---

*Original Answer*:

The premise in your question title is incorrect; the second developers changes do *not* "override" the first developers changes.

The point at which changes are integrated is when syncing between repos with push and fetch (or pull). Each local repo (clone) is an independent repo in which the user can - and *must be able to* - commit without concern for whether someone else might have committed to the corresponding branch in a different repo.

Since you expect GitHub to warn developer2, I take that to mean that developer1 has committed and pushed their changes. This is good. So now developer2 commits some changes, not yet having updated from the remote. Still ok. Now *when developer2 tries to push*, an error will result saying that developer2's branch is not up to date. *That* is how git avoids losing developer1's changes.

So developer2 will be told to fetch and merge (or rebase), or pull, the latest changes before being allowed to push.

The git model is one of distributed development. It is essential that developers be able to commit independently, and in fact you wouldn't want to be trying to merge changes that haven't been committed because then if something went wrong you could lose those changes. So merges are always done locally and always among committed changes.