-
Note: since this discussion, the documentation has kindly been updated by Tim. May I ask for clues for how to recover my content lost as below? Perhaps my faux-pas may help me to elaborate on the Git compatibility documentation? DescriptionFirst time use of Sadly I lost all content! The jj log showed one previous entry and the jj op log showed many. I could not for the life of me figure out how to restore my content. Not with jj, nor with my marginally better understanding of git! Steps to Reproduce the Problem# Move the Git repo
mv .jj/repo/store/git .git
# Tell jj where to find it
echo -n '../../../.git' > .jj/repo/store/git_target
# Ignore the .jj directory in Git
echo '/*' > .jj/.gitignore
# Make the Git repository non-bare and set HEAD
git config --unset core.bare
jj new @- # edit: new documentation says do instead $ jj new && jj undo # that recovered files not checked in and fixed my issue here Expected BehaviorSome clues about how to create and preserve a git history in the Actual BehaviorThe moved hit repo contains no HEAD or other refspec. The refs/jj/keep do not seem to be recognised by a git checkout. Specifications
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
What did you do after
What is "content", files in the directory, commits as displayed by
Well, paste it here, at the least the first few entries and we might be able to give a hand.
The command See also: #4948 |
Beta Was this translation helpful? Give feedback.
-
It doesn't reproduce for me. Here's what I did:
|
Beta Was this translation helpful? Give feedback.
-
If it's the problem Tim mentioned, then you simply need to update back to your old working-copy commit. You can find the commit in |
Beta Was this translation helpful? Give feedback.
Ok, looks like you created the repo (op 881d7dbb8d90), jj took a snapshot of your files (op cc7b6bddfc06), later it took a snapshot of your modifications (op 9ae042b57ce5) and then you started the co-location procedure. In operation fecf27d8b423, a new commit was created based on the parent commit of your working copy. Which means your files got stored away in the commit created in op 9ae042b57ce5, a new commit was created without the files and checked out.
Here are a few options you now have:
# Take close look at all operations including the diff of your files: jj op log -p -s
# Take a look at the last commit that included your files, write down the commit ID: jj log -p -s -T builtin_log…