Git: How to create a new branch but somewhat different project

I am going to update my Rails3 project to 4 and at the same time have a clean start project all together. So my solution is to create a new rails4 project and just transfer one by one, what I need in my previous project.

I was thinking of creating a new branch for my new rails4 project and eventually when I’m done is transfer it back to master and override it. I have come up with two solutions but I don’t know what both implications would be. Which should I implement?

  • Http 404 when trying to get files from GitLab API
  • How to make an existing subdir as subtree for another git repo, with squashed commit?
  • Git PowerShell Cmdlets returning git info as objects
  • Git hook to indicate repository is deprecated
  • How to change UI colors for gitk?
  • How to see al the commit tree in git bash?
    1. Just create a new branch git checkout -b v2 and do a git rm -rf on the project. Start my new rails app and commit or
    2. Use –orphan? I just recently found this option in git. So I’d use git checkout --orphan v2 do also a git rm -rf on the project and start my new rails app and commit.

    Basically they look almost the same but I was wondering like what would happen if I tried to merge them back to master or override master already?

  • How to disable to git delta compression when garbage collecting
  • how setup heroku toolbelt to use -r <nickname> to specify an app
  • Github API - create branch?
  • bash seeing parameter as function
  • Need suggestions to get the git clone work from a ssh server using python script
  • Git submodule update from post-receive hook
  • One Solution collect form web for “Git: How to create a new branch but somewhat different project”

    my old project already has a lot of clutter and unused codes and I don’t want to do the new one on top of those already. So instead of remove what I don’t need, I opted of moving what I need

    One solution would simply to manage a different repo, if having the history isn’t that important.

    Or, if you must keep one repo, go with option 2/ (orphan branch)

    If the merge to master with override is what worries you, I have summarized the different ways to achieve that in “git command for making one branch like another”.

    Git Baby is a git and github fan, let's start git clone.