Create branch at specific change set, move changests after this point to different branch

Hypothetical scenario:
By mistake, I’ve been working away on my ‘Main’ branch.

What I need to do, is effectively reset my Main branch to a particular changeset – 1001 for example.
Changesets after 1001, I want to move to a new branch – ‘Dev’

  • Multiple Developers + Single Dynamics CRM Instance + Git - How to overcome challenges?
  • TFS 2013 Tracking Changeset(commits) with GIT
  • Git tag at the end of build on Visual Studio Online (Build vNext, hosted pool)
  • How do I handle a complex set of related projects using TFS 2013 GIT repository and branching?
  • Should we use Git or TFVC on a TFS 2015
  • It's possible that Team Foundation Server Version Control support external repo like git
  • Is this possible?

    I come from a git background, so if this were a git repository, I would probably use something like:

    git checkout -b Dev 1001  //create branch at 1001
    git checkout Main  //back on Main
    git reset --hard 1000  //reset main to 1000

  • How to merge bug fix branch into trunk and release branch
  • TFS Structure - Multiple Projects or Single Project?
  • Possible to use git project AND see TFS work items in VS2013?
  • Creating a Patch with TFS
  • Connect to git repository in TFS or Visual Studio Online
  • Get pretty git rev name
  • One Solution collect form web for “Create branch at specific change set, move changests after this point to different branch”

    No, this is not possible in the server based source control world.

    I would recommend that you take a copy of your code, and roll back the change.

    Then create a branch and overwrite the changes that you copied. Dirty, but works…

    Solution: Use git

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