C
C#2y ago
M B V R K

❔ Can't push a commit to GitHub from VS Code or VS

I'm working on a github project (Asp.net core, contains two projects one is ASP.NET CORE API and the other is ASP.NET CORE Angular), recently I added some assets files to the Client App in assets folder with a size of 90MO, now I have 3 commits and when I do Push from VS or VS Code I get the errors show in the attachements. Pleaaaaaaaaaaase help me, I was one day and I'm still looking for a solution and I have to push those commits. Thanks in advance <3
59 Replies
ero
ero2y ago
french pepepoint
Pobiega
Pobiega2y ago
check the actual error message, by clicking "open git log" or check the output window
M B V R K
M B V R KOP2y ago
lol wtf ?
ero
ero2y ago
fuckin mega octets lol
M B V R K
M B V R KOP2y ago
ahahahah
ero
ero2y ago
but yeah show us the error
M B V R K
M B V R KOP2y ago
omg it takes 30 minutes to show that message
Pobiega
Pobiega2y ago
... what?
ero
ero2y ago
has pushing worked in the past? you didn't change anything about the git setup?
M B V R K
M B V R KOP2y ago
When I push the VS or VS Code do more than 20 min of processing then showing those messages
Pobiega
Pobiega2y ago
that sounds weird.
M B V R K
M B V R KOP2y ago
no, everything was fine and I don't change anything
Pobiega
Pobiega2y ago
but we need to see the actual error message from git
ero
ero2y ago
and you didn't think to save the one message it comes up with at the end of that 😭
Pobiega
Pobiega2y ago
the important bit about git is that its distributed, meaning your local version and the github version might have diverged, which is why a pull might be needed
M B V R K
M B V R KOP2y ago
sometimes I get the RPC Failed ... error
ero
ero2y ago
in vsc you can actually just open the git output manually so before you do the push operation
M B V R K
M B V R KOP2y ago
I'm not getting the same message, everytime I see a new message and in other times I see old messages I don't remember if there is any Commits I didn't pulled, I have the last version omg I'm gonna be crazy
ero
ero2y ago
the size of the commit shouldn't matter i don't think
Pobiega
Pobiega2y ago
might be easier to just open up a normal terminal and do "git status"
ero
ero2y ago
90mb isn't that much anyway
Pobiega
Pobiega2y ago
and "git fetch"
ero
ero2y ago
i don't think there's anything to pull vsc would show that
Pobiega
Pobiega2y ago
fair
ero
ero2y ago
Pobiega
Pobiega2y ago
I do not use vsc/vs git
ero
ero2y ago
would show down as well
Pobiega
Pobiega2y ago
yep, that makes sense
ero
ero2y ago
vsc + the git kraken extension are godlike for anything git related fuck learning all the commands
Pobiega
Pobiega2y ago
I use terminal for most things, and Fork for the complicated stuff like rebasing, cherry picking, merges etc
ero
ero2y ago
yeah i know like a handful of git commands and that's good enough for me
Pobiega
Pobiega2y ago
you can go a long way with just pull, commit, push, branch, checkout
ero
ero2y ago
yup
M B V R K
M B V R KOP2y ago
When I do it I get these messages
M B V R K
M B V R KOP2y ago
Do you have any idea ?
Jimmacle
Jimmacle2y ago
it tells you what's wrong you're trying to push massive files to your repository it looks like files that aren't supposed to be committed to version control to begin with .angular/cache coincidentally, trying to push hundreds of MB worth of cache junk is probably why it's taking so long before failing you need to fix your .gitignore so you don't accidentally commit files that aren't actual source code: https://git-scm.com/docs/gitignore also depending on how many times you've committed files like this you may need to filter your repo and force push to clean it up see above
M B V R K
M B V R KOP2y ago
So is that means that I should ignore the angular/cache from being committed ??
Jimmacle
Jimmacle2y ago
you always want to ignore any files like caches, build output, etc. versioning them isn't meaningful and just bloats your repo
Pobiega
Pobiega2y ago
Jimmacle
Jimmacle2y ago
the problem is that you have already committed these files, so you have to screw around with your repo history to remove them
M B V R K
M B V R KOP2y ago
Please do you have any idea about how to ignore them without using git commands, I mean only using VS Code's UI
Jimmacle
Jimmacle2y ago
yes, if you read all of what i said earlier but like i said, you're already SOL in terms of not using git commands to fix this because you need to remove the files from your repo history
Jimmacle
Jimmacle2y ago
GitHub
GitHub - newren/git-filter-repo: Quickly rewrite git repository his...
Quickly rewrite git repository history (filter-branch replacement) - GitHub - newren/git-filter-repo: Quickly rewrite git repository history (filter-branch replacement)
Pobiega
Pobiega2y ago
and this is why I recommend either learning the git cli properly, or using a dedicated git client like Fork the whole "add everything and commit" thing people are doing is terrible
Jimmacle
Jimmacle2y ago
i avoid using git guis for anything that isn't objectively better to do in a gui like selecting specific files to commit or something trivial like committing
Pobiega
Pobiega2y ago
I mostly use it for merges, interactive rebases and other stuff where I need to inspect/jump around in the history a lot CLI is 95% of my day to day
Jimmacle
Jimmacle2y ago
if you absolutely can't handle getting dirty with git CLI tools, your best option is probably to just make a new repo, copy your files over, make a proper .gitignore and start your history over and double check when you commit files so you don't add anything that shouldn't be there @Pobiega is Fork worth $50? at first glance it looks pretty similar to sourcetree
Pobiega
Pobiega2y ago
Imho, best git client there is. Lifetime license as well, so its a one time cost. that said, if sourcetree works for you, use it they have an unlimited trial that doesnt even have a fixed time limit, so feel free to try it out and see if you like it
You can download and evaluate the Software for free, but need to purchase a license for long-term use.
I used it for a few months and bought a license. Only once did I have a problem with it, and after mailing their support it took 12 minutes to get an answer that solved my problem 🙂
M B V R K
M B V R KOP2y ago
What about removing the Repository then re-initilize it ?
Pobiega
Pobiega2y ago
that will reset your local git, but not github you can then re-add the remote and force push, if you want to "start over"
M B V R K
M B V R KOP2y ago
hmmmm, I mean remove the Github repository and re-create a new one then remove the .git from my projet and re-link my local repository with the new Github repository, is this can be safe ??
Pobiega
Pobiega2y ago
that would work, but you wouldn't learn anything but go ahead if you just want this "fixed"
M B V R K
M B V R KOP2y ago
I saw you mentioned before the Forks, is it a GIT Tool ??
Pobiega
Pobiega2y ago
yup
Pobiega
Pobiega2y ago
Fork - a fast and friendly git client for Mac and Windows
Fork - a fast and friendly git client for Mac and Windows
Fork - a fast and friendly git client for Mac and Windows
Pobiega
Pobiega2y ago
looks like this
M B V R K
M B V R KOP2y ago
Is it free ?
MODiX
MODiX2y ago
Pobiega#2671
You can download and evaluate the Software for free, but need to purchase a license for long-term use.
React with ❌ to remove this embed.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server