git-p4 submit fails with "Not a valid object name HEAD~261"
- by Harlan
I've got a git repository that I'd like to mirror to a Perforce repository. I've downloaded the git-p4 script (the more recent version that doesn't give deprecation warnings), and have been working with that. I've figured out how to pull changes from Perforce, but I'm getting an error when I try to sync changes from the git repo back. Here's what I've done so far:
git clone [email protected]:asdf/qwerty.git
git-p4 sync //depot/path/to/querty
git merge remotes/p4/master (there was a single README file...)
So, I've copied the origin to a clean, new director, got a lovely looking merged tree of files, and git status shows I'm up-to-date. But:
> git-p4 submit
fatal: Not a valid object name HEAD~261
Command failed: git cat-file commit HEAD~261
This thread on the git mailing list seems to be relevant, but I can't figure out what they're doing with all the A, B, and Cs. Could someone please clarify what "Not a valid object name" means, and what I can do to fix the problem? All I want to do is to periodically snapshot the origin/master into Perforce; a full history is not required. Thanks.