Skip to content

Instantly share code, notes, and snippets.

@f440
Created April 2, 2011 17:41
Show Gist options
  • Save f440/899695 to your computer and use it in GitHub Desktop.
Save f440/899695 to your computer and use it in GitHub Desktop.
ブランチでコミットをいくつかしたけどブランチ名かえたくなった
#!/bin/sh
# ブランチでコミットをいくつかしたけどブランチ名かえたくなった
# http://labs.timedia.co.jp/2011/04/rename-and-delete-localbranch-in-mercurial.html
set -x
hg clone https://bitbucket.org/f440/sample
cd sample
hg update -C "parents(roots(branch(topic)))"
hg qimport -r "branch(topic)"
hg qpop -a
hg branch feature
hg qpush -a
hg qfinish -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment