Closed benmiller314 closed 5 years ago
It turns out that it's not a blanket prohibition on Git-LFS objects in general; it's just that the owner of the repository has to signal that they want LFS objects first, by including at least one LFS object themselves.
For the soundscape project, I'd included .mp3 files in my .gitattributes setup for LFS, and I'd included the mystery-sound.mp3 file, so everything worked fine.
So I went ahead and added a new .xcf file to the original ("upstream") repository, so hopefully this will just start working again now.
However, if it doesn't work, you may need to pull the changes from that upstream branch. If you're comfortable with command line, there are good instructions on how to do that here: help.github.com/en/articles/merging-an-upstream-repository-into-your-fork.
But if you're not sure what those instructions are doing, and you'd rather not mess around in command line without that understanding, there's also a way to do it with GitHub Desktop. I couldn't find a good visual walkthrough of that process, so I'm making one here.
If you see a branch called "upstream/master," you know you're in a forked repo. Don't click on the upstream here, though: you want to be on the destination branch, which is probably just called "master."
Once you know you're in the right place, click on the button at the bottom to "choose a branch to merge into master (or whatever your local branch is called).
On the next screen, you can now select the upstream/master to merge into master.
If there are no conflicts, you'll get right back to your GitHub Desktop homescreen – perhaps with a prompt to push the changes you just merged in.
If the changes from the repo you forked (the "upstream") conflict with the changes you've made to your new repo – e.g. if you've written your own README.md file, and the upstream would revert your edits – you'll have to resolve a merge conflict. You'll first encounter this warning at the merge stage:
GitHub Desktop will then helpfully offer to open your preferred text editor to fix the merge conflict.
Depending on the filetype where the error occurs, it may be easier just to
But if the change really is in a text-based file, it might be easy enough to pick the versions you want – even going line-by-line. For this, I highly recommend the text editor Atom. One of its neat features is that it has git merge resolution built in. It will highlight the local version (as "our changes") and the version from the merge (as "their changes"), and all you have to do is click a single "Use me" button at the top of the highlighting and Atom takes care of the rest.
At that point, you can head back to GitHub Desktop to carry on with the merge:
That should bring you back to the home screen, where GitHub Desktop will probably suggest (as in the original, merge-conflict-free scenario) that you push your changes.
And you can get on with your actual editing!
@benmiller314 I had the same issue with the pop up of:
I followed the solution of merging upstream/master to the master, and it was successful to merge but I still get the pop up of unable to push.
@JasmineCT Do you think it might be the same problem of git-lfs being enabled, but not having any files that use git-lfs in the upstream repository you forked? You might need to contact the owner of that repo, whether on their issue queue or with a pull request.
@benmiller314 it could be that issue. It's actually my repository, but I never created an upstream branch. I'm not sure where it cam from.
Weird. Do you remember forking a repository, possibly even your own? That's the only way to have an "upstream" and "downstream," as far as I know.
You should be able to see the full fork network (including the upstream / root) when you go to https://github.com/JasmineCT/portfolio/network/members (or substitute the actual repo URL for the part before /network/members).
On Thu, Oct 29, 2020 at 8:14 AM Jasmine Carlucci-Tanguay < notifications@github.com> wrote:
@benmiller314 https://github.com/benmiller314 it could be that issue. It's actually my repository, but I never created an upstream branch. I'm not sure where it cam from.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/benmiller314/cdm2019fall/issues/9#issuecomment-718713751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYI3YM6TCOYN3CGSSY7Z3DSNFMBPANCNFSM4I7N3F5A .
Several students wrote to me today to say they'd gotten an error message: they weren't allowed to push their GIMP .xcf files to GitHub.
Problem! I'd set up the .gitattributes file to designate .xcf files as Git-LFS objects, and now they were blocked, because public forks don't allow LFS objects to be pushed.
But this is also confusing, because we'd been able to use Git-LFS just fine with Audacity. What's up?