Skip to content

Serious Bug: Oxen deletes committed files during merge #183

@ifsheldon

Description

@ifsheldon

Steps to reproduce:

  1. Create a repo on oxen.ai, say bug-repo with readme
Image
  1. On local machine,
     mkdir test-bug && cd test-bug && mkdir dir && touch dir/somefile.txt
     oxen init
     oxen add dir
     oxen commit -m "add dir"
     oxen config --set-remote origin https://hub.oxen.ai/<user-name>/bug-repo
    
  2. Try push with oxen push which will error like
🐂 oxen push origin main -> e34aad8fb0ae69279ebf379a53b93e11
Error pushing: Branch main is behind bbf80d9717dd8fecda74f33d97f8b8fb must pull.

Run `oxen pull` to update your local branch
Branch main is behind bbf80d9717dd8fecda74f33d97f8b8fb must pull.

Run `oxen pull` to update your local branch
  1. Follow the suggestion: run oxen pull which will "merge" the commits
  2. Now you've reproduced the bug, just check ls dir and you will find somefile.txt is gone. And there's no commits left in oxen log that refer to the "add dir" commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions