Skip to content

Commit

Permalink
add git hash changes announcement (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbluque authored Jan 19, 2025
1 parent 221b1e4 commit c162617
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
37 changes: 37 additions & 0 deletions GIT-CHANGES-17-01-25.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Synchronizing your git history after large file removal on January 17, 2025
---------------------------------------------------------------------------

As a result from our migration into a monorepo which kept the git history from the legacy Open Catalyst repository,
the `FAIRChem` repository was 10MB of files combined with ~350MB of git history for files that no longer exist, but
were still present in the git history.

We removed those files in order to reduce the repository size, but that resulted in changed commit hashes. If you are
currently developing or planning to develop please do the following:

**Do not force push anything or your PR will be rejected**

1. Backup your current repo if you have local changes
```bash
rsync -av current_repo backup_of_current_repo
```
2. Migrating a branch (without local changes)
If you do not have local changes in the branch you wish to keep, ontop of those already on the GitHub (remote)
> :warning: This will erase all local changes
```bash
git reset --hard origin/branch_name
```
3. Migrating a branch (with local changes)
We need to first unstage any commits that are not present on the remote. To do this use https://github.com/FAIR-Chem/fairchem/tree/main
to find what the last commit was to the remote branch (the hash wont match, match the commit message). Find the last
matching commit in your local history, use git log to find this. Once you have the hash from git log, unstage these commits using,
```bash
git reset --soft last_commit_on_remote
```
Then stash the changes, hard reset to the remote, and pop the changes from stash
```bash
git stash
git reset --hard origin/branch_name
git stash pop
```

If you encounter any issues please open an issue.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

`fairchem` is the [FAIR](https://ai.meta.com/research/) Chemistry's centralized repository of all its data, models, demos, and application efforts for materials science and quantum chemistry.

> :warning: **If you cloned the repo before January 17, 2025 and are actively developing, please read [this announcement](GIT-CHANGES-17-01-25.md).**
### Documentation
If you are looking for `Open-Catalyst-Project/ocp`, it can now be found at [`fairchem.core`](src/fairchem/core). Visit its corresponding documentation [here](https://fair-chem.github.io/).

Expand Down Expand Up @@ -45,9 +47,9 @@ from ase.optimize import LBFGS
from fairchem.core import OCPCalculator

# Set up your system as an ASE atoms object
slab = fcc100('Cu', (3, 3, 3), vacuum=8)
slab = fcc100("Cu", (3, 3, 3), vacuum=8)
adsorbate = molecule("CO")
add_adsorbate(slab, adsorbate, 2.0, 'bridge')
add_adsorbate(slab, adsorbate, 2.0, "bridge")

calc = OCPCalculator(
model_name="EquiformerV2-31M-S2EF-OC20-All+MD",
Expand Down

0 comments on commit c162617

Please sign in to comment.