You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warn me before I commit large files without using Git LFS #997
#5079 was opened to indicate that it'd be nice to even list the files that were committed that are over 100MB - the Git server doesn't include these when it fails the git push - but I think it'd be nicer to warn the user before committing.
Reacted by Billy Griffin, Bryan Bortz, Caner Elci, G Soares Peres, Arthur Morris and voidea
We've seen this pop up pretty frequently and we'd love it if someone from the community wanted to take a look at a potential check on large files before committing, unless using Git LFS.
Considerations:
This should not materially slow down the speed of commits (will likely be most visible when a user is committing a lot of files).
It should still work as it does today with Git LFS configured (in other words, there shouldn't be a warning if someone is using Git LFS).
I have the same problem. I often find myself not being able to find the file (because it's actually no longer there and just buried in commit history) and resolve the conflict. My current method of solving these situations is rather crude :/ , but has proven successful.
move the folder where I have made changes to outside of the repos
remove the clone from Github Desktop and move to trash
@canerelci@HedvigS if you are having issues tracking down the specific large files you need to remove from your repository the log file from GitHub Desktop will provide the filenames. You can find the log file by going to the file menu in GitHub Desktop and selecting Help > Show Logs in Finder (macOS) or Explorer (Windows). Please be sure to upload a log file from a day where you experienced the error in your screenshot. I would be happy to take a look at the log and let you know what files you need to remove.
You can also search the log file directly by looking for the This file exceeds GitHub's file size limit of 100MB error message -- that error will be preceded by the filename.
Thanks @steveward . The problem now is more to do with the resolution, I just thought it'd be good if the dialogue box also included this information.
If I've committed a file to my local branch that's too large, even if I remove it from the folder I still can't push. Hence the whole re-cloning thing :)
If I've committed a file to my local branch that's too large, even if I remove it from the folder I still can't push. Hence the whole re-cloning thing :)
@HedvigS this is because it's still preserved in the Git history in a previous commit, and pushing the branch after cleaning it up will still try to push that old commit containing the 100MB file
@shiftkey Yes.
So could there be a stop at the commit level already instead of later at the push-stage?
Or is there an easy way to clean the commit history inside the app right now?
I believe all that is left is clearing the commit summary afterwards.
Oh nice!! Ok, so my thoughts on that are to pass a (fat arrow) function to the popup that wraps the clearCommitMessage function and then call that from the popup if the commit is successful. Does that make sense? Its a little bit of a hack but it should work (and if others have better ideas they can comment on the PR).
@outofambit
This is what I had tried initially with a couple of the other functions and I couldn't seem to get it working as expected. I gave it a try again with the clearCommitMessage function but it errors out saying that "this.setState is not a function".
Perhaps there is another way to do it? I tried by passing the function as () => void to the dispatcher and passing it to the dialog via props.
i'm wondering if we should solve that in a different PR after your PR and #5809 land (since both have the same issue). i'm thinking we need to use the dispatcher et al to reset the commit-message state whenever a commit is made (i think this would mean setting the app's state directly inside app-store and calling emitUpdate. i'm happy to take a run at that and put a PR up for it on monday. How does that sound?
@outofambit
If I understand correctly, you're suggesting proceeding to a PR for the current progress and addressing the issue of the commit message clearing separately?
Does this mean I should create the PR as it is without the code that tries to call the clearCommitMessage function?
I think that would be wonderful if you're interested in taking a look at this issue. Thanks again for your help!
If I understand correctly, you're suggesting proceeding to a PR for the current progress and addressing the issue of the commit message clearing separately?
Does this mean I should create the PR as it is without the code that tries to call the clearCommitMessage function?
@Daniel-McCarthy yes exactly! thank you again! just mention that its a known issue in the PR description and tag me as agreeing to fix that separately :)
i'm thinking we need to use the dispatcher et al to reset the commit-message state whenever a commit is made (i think this would mean setting the app's state directly inside app-store and calling emitUpdate.
apparently this already exists! its just buried here:
@outofambit@Daniel-McCarthy best of luck - last time I was looking at "how can i clear the commit form programatically" I had some regrets and eventually had to roll back the changes - #5208#5260#5269
Activity
shiftkey commentedon Mar 2, 2017
Nope, we don't do any checks or limitations on what you commit. Given we have Git LFS included we could definitely provide better guidance here.
Probably not in scope for the beta, given the existing apps didn't do any sort of guidance either.
shiftkey commentedon Jul 3, 2018
#5079 was opened to indicate that it'd be nice to even list the files that were committed that are over 100MB - the Git server doesn't include these when it fails the
git push- but I think it'd be nicer to warn the user before committing.billygriffin commentedon Sep 24, 2018
We've seen this pop up pretty frequently and we'd love it if someone from the community wanted to take a look at a potential check on large files before committing, unless using Git LFS.
Considerations:
canerelci commentedon Oct 16, 2018
I have no idea which one of hundreds of files...
HedvigS commentedon Oct 18, 2018
I have the same problem. I often find myself not being able to find the file (because it's actually no longer there and just buried in commit history) and resolve the conflict. My current method of solving these situations is rather crude :/ , but has proven successful.
steveward commentedon Oct 18, 2018
@canerelci @HedvigS if you are having issues tracking down the specific large files you need to remove from your repository the log file from GitHub Desktop will provide the filenames. You can find the log file by going to the file menu in GitHub Desktop and selecting
Help>Show Logs in Finder (macOS) or Explorer (Windows). Please be sure to upload a log file from a day where you experienced the error in your screenshot. I would be happy to take a look at the log and let you know what files you need to remove.You can also search the log file directly by looking for the
This file exceeds GitHub's file size limit of 100MBerror message -- that error will be preceded by the filename.HedvigS commentedon Oct 18, 2018
Thanks @steveward . The problem now is more to do with the resolution, I just thought it'd be good if the dialogue box also included this information.
If I've committed a file to my local branch that's too large, even if I remove it from the folder I still can't push. Hence the whole re-cloning thing :)
shiftkey commentedon Oct 18, 2018
@HedvigS this is because it's still preserved in the Git history in a previous commit, and pushing the branch after cleaning it up will still try to push that old commit containing the 100MB file
HedvigS commentedon Oct 18, 2018
@shiftkey Yes.
So could there be a stop at the commit level already instead of later at the push-stage?
Or is there an easy way to clean the commit history inside the app right now?
19 remaining items
outofambit commentedon Oct 26, 2018
Oh nice!! Ok, so my thoughts on that are to pass a (fat arrow) function to the popup that wraps the
clearCommitMessagefunction and then call that from the popup if the commit is successful. Does that make sense? Its a little bit of a hack but it should work (and if others have better ideas they can comment on the PR).Daniel-McCarthy commentedon Oct 26, 2018
@outofambit
This is what I had tried initially with a couple of the other functions and I couldn't seem to get it working as expected. I gave it a try again with the
clearCommitMessagefunction but it errors out saying that "this.setState is not a function".Perhaps there is another way to do it? I tried by passing the function as
() => voidto the dispatcher and passing it to the dialog via props.outofambit commentedon Oct 26, 2018
@Daniel-McCarthy i bet its because
desktop/app/src/ui/changes/commit-message.tsx
Lines 221 to 223 in 237695f
is not bound to the component instance. 😞
i'm wondering if we should solve that in a different PR after your PR and #5809 land (since both have the same issue). i'm thinking we need to use the
dispatcheret al to reset thecommit-messagestate whenever a commit is made (i think this would mean setting the app's state directly insideapp-storeand callingemitUpdate. i'm happy to take a run at that and put a PR up for it on monday. How does that sound?Daniel-McCarthy commentedon Oct 26, 2018
@outofambit
If I understand correctly, you're suggesting proceeding to a PR for the current progress and addressing the issue of the commit message clearing separately?
Does this mean I should create the PR as it is without the code that tries to call the
clearCommitMessagefunction?I think that would be wonderful if you're interested in taking a look at this issue. Thanks again for your help!
outofambit commentedon Oct 26, 2018
@Daniel-McCarthy yes exactly! thank you again! just mention that its a known issue in the PR description and tag me as agreeing to fix that separately :)
Daniel-McCarthy commentedon Oct 26, 2018
@outofambit Fantastic! I will do that now.
outofambit commentedon Oct 29, 2018
@Daniel-McCarthy
apparently this already exists! its just buried here:
desktop/app/src/lib/dispatcher/dispatcher.ts
Lines 526 to 531 in f94a5cf
so you (and I) should be able to call this dispatcher method to clear the field! 🎊
shiftkey commentedon Oct 29, 2018
@outofambit @Daniel-McCarthy best of luck - last time I was looking at "how can i clear the commit form programatically" I had some regrets and eventually had to roll back the changes - #5208 #5260 #5269
outofambit commentedon Oct 29, 2018
thanks for the heads up @shiftkey ! i'm gonna say let's stick with the original plan of that being its own PR then (that I'll take on).
shiftkey commentedon Oct 29, 2018
@outofambit I will say a little prayer for you
[-]No check on committing large files [/-][+]Warn me before I commit large files without using Git LFS[/+]Breakable Asteroids Drop Health Ore