Question: So I need to upgrade an rails 2.3.14 app to rails 3. We use git, so decided to create another branch 'rails3' (git checkout -b rails3). The easiest solution I found to the problem of the upgrade was removing all stuff and generating a new project and copy/pasting controllers , views, etc.. from master. But now `git status` tells me those files were deleted and regenerated, not *modified*, although most of them are in the same place they were before. So changes remain obscure, other programmers wont see the subtle changes to files.

What have I've done:

```none
/path/to/rails_project/ (master) $ git checkout -b rails3
/path/to/rails_project/ (rails3) $ rm -rf ./* # not git rm
/path/to/ $ rails new rails_project
/path/to/rails_project/ (rails3) $ cp old/project/stuff/from/another/dir

```

How can I 'tell' git that these files were modified, not deleted and regenerated? I have the upgraded app in a totally different directory so its fine to implode cosmos and do all from start.

Answer: 
this might be a clean solution for you:

```
<form action="" method="post">
    <input type="submit" name="page" value="Home" />
    <input type="submit" name="page" value="About Us" />
    <input type="submit" name="page" value="Games" />
    <input type="submit" name="page" value="Pages" />
</form>
<?php
    switch($_POST["page"]){
        case "About Us":
            include 'au.php';
            break;
        case "Games":
            include 'games.php';
            break;
        case "Pages":
            include 'pages.php';
            break;
        default:
            include 'home.php';
            break;
    }

```
So, this will check, if `$_POST` is not set, load home.php else, if it is set then continue

```
    if (!isset($_POST)){ // if post is not set, show home.php
           include 'home.php';
        }else if (isset($_POST['AboutUs'])){
            include 'au.php';
        }else if (isset($_POST['Games'])){
            include 'games.php';
        } // and you can keep going like that

```