On Thu, Jun 1, 2017 at 8:35 PM, Sahil Dua <sahildua2305@xxxxxxxxx> wrote: > Adds copy branch option available using -c or -C (forcefully). Commenting on the series in general. I have a fixup branch for you with commits to squash: https://github.com/avar/git/tree/avar/sahildua-rename-branch-2 issues: - There's a mixed variable declaration with code, should be predeclared. - Stuff like printf(_("% branch), "copied") gives bad translations, needs to be expanded - Fixed up comment style In addition when I try to run the tests I get: fatal: cannot lock ref 'refs/heads/a': 'refs/heads/a/b/c' exists; cannot create 'refs/heads/a' not ok 45 - git branch -c a a/a should fail And there's 18 other failures in that test script, although some could be from that first failure, doesn't this fail for you? I can't see why it wouldn't everywhere, i.e. you're trying to create a "a" ref when "a/b/c" exists.