Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning during git clone: large files should be handled with git lfs #25

Open
kelly-sovacool opened this issue Jan 9, 2024 · 4 comments
Assignees
Labels
ASPEN RepoName

Comments

@kelly-sovacool
Copy link
Member

kelly-sovacool commented Jan 9, 2024

Warning message when attempting to clone this repo:

Cloning into 'ASPEN'...
remote: Enumerating objects: 1103, done.
remote: Counting objects: 100% (200/200), done.
remote: Compressing objects: 100% (131/131), done.
remote: Total 1103 (delta 71), reused 158 (delta 64), pack-reused 903
Receiving objects: 100% (1103/1103), 645.99 MiB | 3.98 MiB/s, done.
Resolving deltas: 100% (604/604), done.
Updating files: 100% (125/125), done.
Encountered 4 files that should have been pointers, but weren't:
        resources/blacklistFa/hs1.blacklist.fa.gz
        resources/frip/hs1.DHS.bed.gz
        resources/frip/hs1.enhancers.bed.gz
        resources/tssBed/hs1_tssbeds.tar.gz

This causes an error when trying to commit other unrelated changes:

An unexpected error has occurred: CalledProcessError: command: ('/Library/Developer/CommandLineTools/usr/libexec/git-core/git', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', '/Users/sovacoolkl/.cache/pre-commit/patch1704842321-37084')
return code: 1
stdout: (none)
stderr:
    error: the patch applies to 'resources/tssBed/hs1_tssbeds.tar.gz' (555ec58cde1546d9624e100af8985918dfcfbc3e), which does not match the current contents.
    error: resources/tssBed/hs1_tssbeds.tar.gz: patch does not apply
Check the log at /Users/sovacoolkl/.cache/pre-commit/pre-commit.log

Looks like something went wrong when these files were initially commited?

@kopardev kopardev added the ASPEN RepoName label Jan 9, 2024
@kopardev
Copy link
Member

Using this solution tried:

git rm .gitattributes
git add -A
git reset --hard

but no change

╰─(dev) ○ git clone https://github.com/CCBR/ASPEN.git
Cloning into 'ASPEN'...
remote: Enumerating objects: 1273, done.
remote: Counting objects: 100% (144/144), done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 1273 (delta 95), reused 89 (delta 87), pack-reused 1129
Receiving objects: 100% (1273/1273), 631.48 MiB | 57.48 MiB/s, done.
Resolving deltas: 100% (691/691), done.
Updating files: 100% (133/133), done.
Encountered 4 files that should have been pointers, but weren't:
	resources/blacklistFa/hs1.blacklist.fa.gz
	resources/frip/hs1.DHS.bed.gz
	resources/frip/hs1.enhancers.bed.gz
	resources/tssBed/hs1_tssbeds.tar.gz

@kopardev
Copy link
Member

Previously, these 4 files were showing as "modified" right after clone-ing the repo. But now:

╰─(dev) ⠠⠵ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

So I guess not a big issue.. possibly can be ignored. Keep git-lfs in PATH.

@kelly-sovacool
Copy link
Member Author

@kopardev I think the problem is there's a commit in the history where those files were changed without lfs, so a fix would have to modify the commit history and track them with lfs. Maybe this? git-lfs/git-lfs#1939 (comment)

@kelly-sovacool
Copy link
Member Author

@kopardev I think the problem is there's a commit in the history where those files were changed without lfs, so a fix would have to modify the commit history and track them with lfs. Maybe this? git-lfs/git-lfs#1939 (comment)

@kopardev this is still a problem when I try to clone this repo. Can you try the possible solution linked above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASPEN RepoName
Projects
None yet
Development

No branches or pull requests

2 participants