3

I'm trying to import a Git repository using the command-line. I'm using this guide

But I keep running into this error at Step 3:

% git push --mirror https://github.com/kbavishi/prads.git
[...]
remote: error: GH002: Sorry, branch or tag names consisting of 40 hex characters are not allowed.
remote: error: Invalid branch or tag name "19f72fa66ffc0ba33f00ba5e5897e109f822e939"
To https://github.com/kbavishi/prads.git
! [remote rejected] 19f72fa66ffc0ba33f00ba5e5897e109f822e939 -> 19f72fa66ffc0ba33f00ba5e5897e109f822e939 (pre-receive hook declined)
[...]

Any idea how to fix this? Apologies in advance, I'm a newbie to Git.

I posted a request on Github support, and I received a response asking me to use git-filter-branch command to amend the tag, and then try importing the repository again. I couldn't quite figure out how to use that

1 Answer 1

2

If, when typing git tag, you see a tag named "19f72fa66ffc0ba33f00ba5e5897e109f822e939", you should be able to rename it easily enough.

git tag NEW OLD 
tag -d OLD

If it is a branch name (type git branch), you should be able to rename it as well.

git branch -m <oldname> <newname>

Once this is done, you can mirror push back to your GitHub repo.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.