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

asked Dec 21, 2016 at 3:08

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.

answered Dec 21, 2016 at 5:45
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.