Skip to content

Instantly share code, notes, and snippets.

@punkrats
Created July 2, 2011 07:51
Show Gist options
  • Select an option

  • Save punkrats/1059829 to your computer and use it in GitHub Desktop.

Select an option

Save punkrats/1059829 to your computer and use it in GitHub Desktop.
git snippets
# 1. Create a copy of master (or whatever branch you're working on)
git branch experimental master
git checkout experimental

# 2. Find SHA of revision to use as branch root with gitx or `git log`

# 3. Reset master to the desired root
git branch -f master <SHA>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment