OATML-Markslab / ProteinNPT

Official code repository for the paper "ProteinNPT: Improving Protein Property Prediction and Design with Non-Parametric Transformers"
MIT License
79 stars 7 forks source link

Rebase errors #11

Closed loodvn closed 6 months ago

loodvn commented 6 months ago

For anyone coming across git errors because of a change on the remote side:

We rewrote one of my earlier commit messages because it was popping up everywhere, but we had to rebase and force push to make this change (we'll make sure not to force push like this in the future though!). So the actual codebase hasn't changed, but you'll just need to do the following commands, which depend on whether you've forked or just cloned the repo.

Scenario 1: You haven't pulled from this repo in the last 7 days There should be no impact - run git pull as usual, and then resolve any conflicts between your local changes and the incoming changes from the repo.

Scenario 2: If you’ve forked the repo and synced your fork with the ProteinNPT repo in the last 7 days: Run each of these commands individually, and use with caution:

git fetch --all # Get all the latest remote changes
git checkout master # Checkout your local master branch
git rebase upstream/master  # Assuming upstream is https://github.com/OATML-Markslab/ProteinNPT.git, which you can check using git remote -v
git push --force origin master  # Push these changes to your repo

Then if you have different branches, run these commands one-by-one (e.g. if you have a branch named ):

git checkout my_local_branch
git rebase master  # Rebase to match the new history from your local master branch
git push --force origin my_local_branch

Scenario 3: If you’ve cloned the ProteinNPT repo locally (no fork) and pulled from the repo in the last 7 days In this case you don't need to do force pushes because you're just working locally. Run each of these commands individually, and use with caution:

git fetch --all
git checkout master
git rebase origin/master  # Assuming origin here is https://github.com/OATML-Markslab/ProteinNPT.git, which you can check using git remote -v

Then for each of your local branches:

# For each of your branches
git checkout my_local_branch
git rebase master

Could you please let me know if this works? I'm happy to help with any steps along the way until it's fixed on your end.