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

Error when trying to Checkout to new Branches other than main #9

Closed
Fe-r-oz opened this issue May 19, 2024 · 7 comments · Fixed by #10
Closed

Error when trying to Checkout to new Branches other than main #9

Fe-r-oz opened this issue May 19, 2024 · 7 comments · Fixed by #10

Comments

@Fe-r-oz
Copy link

Fe-r-oz commented May 19, 2024

git clone https://github.com/evanhockings/QuantumACES.jl.git
Cloning into 'QuantumACES.jl'...
remote: Enumerating objects: 946, done.
remote: Counting objects: 100% (946/946), done.
remote: Compressing objects: 100% (303/303), done.
fatal: the remote end hung up unexpectedlyiB
fatal: early EOF
fatal: index-pack failed

I tried -- depth 1, it does not work as well.

git config --global core.compression 0
git clone --depth 1 https://github.com/Fe-r-oz/QuantumACES.jl.git
Cloning into 'QuantumACES.jl'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (61/61), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 61 (delta 12), reused 30 (delta 11), pack-reused 0
Unpacking objects: 100% (61/61), done.
 is not a valid attribute name: .gitattributes:2
@Fe-r-oz
Copy link
Author

Fe-r-oz commented May 19, 2024

Also, typically, the main branch refer back to the main repo meaning it should refer to QuantumACES.jl, but please check out what I am seeing in my branches.

Screenshot_select-area_20240519232726

@evanhockings
Copy link
Owner

Hmm, it works for me when I clone the repo, although I do get the .gitattributes:2 warning as well. I'm not sure why; it's a standard seeming thing I found to normalise the line endings across my MacOS and Windows devices.

The branches also look fine to me, even when I check things out while not signed in, so I'm not quite sure what's up with that.

image

@evanhockings evanhockings linked a pull request May 21, 2024 that will close this issue
@evanhockings
Copy link
Owner

I tried cloning again and it seems like this pull request fixed the issue, so I'll close it. Feel free to open another if you're still having issues though!

@Fe-r-oz
Copy link
Author

Fe-r-oz commented May 21, 2024

I tried asking on the julia slack channel, so they suggested the .gitattributes PR. Please join the channel if you haven't already. But even with this, the issue seems to persist on linux machine at least:

I believe that it's test it other folks on their linux machines tries to clone and see whether the error persist.

 git clone https://github.com/Fe-r-oz/QuantumACES.jl.git
Cloning into 'QuantumACES.jl'...
remote: Enumerating objects: 697, done.
remote: Counting objects: 100% (697/697), done.
remote: Compressing objects: 100% (251/251), done.
fatal: the remote end hung up unexpectedlyiB | 252.00 KiB/s    
fatal: early EOF
fatal: index-pack failed

We can make changes and open PR via GitHub which seems to work.

@evanhockings evanhockings reopened this May 21, 2024
@Fe-r-oz
Copy link
Author

Fe-r-oz commented May 21, 2024

Hi, @evanhockings, I tried a different method. Increasing the size of the buffer and doing clone by depth -1 works!

Screenshot from 2024-05-21 17-21-46

So, the problem is partially solved. I can checkout to the main branch but not to any new branches
Screenshot from 2024-05-21 17-27-10

@Fe-r-oz Fe-r-oz changed the title Error Cloning Package Error when trying to Checkout to new Branches other than main May 21, 2024
@evanhockings
Copy link
Owner

Okay, great! I checked the branch protection rule I've set on the scalable_aces branch and it should just be making it read-only, so I'm not sure why there'd be any issues with that. Still don't really understand Git particularly well, so I'll let this simmer and come back to it a bit later—probably when I next push some big code updates!

@Fe-r-oz
Copy link
Author

Fe-r-oz commented May 24, 2024

Hi, @evanhockings . I have good news. The issue is solved.

Generally, the checkout issue can be solved by the following:

For Installation

git config --global core.compression 0
git clone --depth 1 https://github.com/Fe-r-oz/QuantumACES.jl.git/ linktoyourGithubrepo

For checkout to custom branch

git remote -v
git remote rm origin
git remote -v
git remote add myfork linktoyourGithubrepo
git remote -v
git fetch --all

Screenshot from 2024-05-24 14-25-24

@Fe-r-oz Fe-r-oz closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants