C
C#16mo 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
ero16mo ago
french pepepoint
Pobiega
Pobiega16mo 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 K16mo ago
lol wtf ?
ero
ero16mo ago
fuckin mega octets lol
M B V R K
M B V R K16mo ago
ahahahah
ero
ero16mo ago
but yeah show us the error
M B V R K
M B V R K16mo ago
omg it takes 30 minutes to show that message
Pobiega
Pobiega16mo ago
... what?
ero
ero16mo 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 K16mo ago
When I push the VS or VS Code do more than 20 min of processing then showing those messages
Pobiega
Pobiega16mo ago
that sounds weird.
M B V R K
M B V R K16mo ago
no, everything was fine and I don't change anything
Pobiega
Pobiega16mo ago
but we need to see the actual error message from git
ero
ero16mo ago
and you didn't think to save the one message it comes up with at the end of that 😭
Pobiega
Pobiega16mo 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 K16mo ago
sometimes I get the RPC Failed ... error
ero
ero16mo 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 K16mo 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
ero16mo ago
the size of the commit shouldn't matter i don't think
Pobiega
Pobiega16mo ago
might be easier to just open up a normal terminal and do "git status"
ero
ero16mo ago
90mb isn't that much anyway
Pobiega
Pobiega16mo ago
and "git fetch"
ero
ero16mo ago
i don't think there's anything to pull vsc would show that
Pobiega
Pobiega16mo ago
fair
ero
ero16mo ago
Pobiega
Pobiega16mo ago
I do not use vsc/vs git
ero
ero16mo ago
would show down as well
Pobiega
Pobiega16mo ago
yep, that makes sense
ero
ero16mo ago
vsc + the git kraken extension are godlike for anything git related fuck learning all the commands
Pobiega
Pobiega16mo ago
I use terminal for most things, and Fork for the complicated stuff like rebasing, cherry picking, merges etc
ero
ero16mo ago
yeah i know like a handful of git commands and that's good enough for me
Pobiega
Pobiega16mo ago
you can go a long way with just pull, commit, push, branch, checkout
ero
ero16mo ago
yup
M B V R K
M B V R K16mo ago
When I do it I get these messages
M B V R K
M B V R K16mo ago
Do you have any idea ?
Jimmacle
Jimmacle16mo 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 K16mo ago
So is that means that I should ignore the angular/cache from being committed ??
Jimmacle
Jimmacle16mo ago
you always want to ignore any files like caches, build output, etc. versioning them isn't meaningful and just bloats your repo
Pobiega
Pobiega16mo ago
Jimmacle
Jimmacle16mo 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 K16mo 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
Jimmacle16mo 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
Jimmacle16mo 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
Pobiega16mo 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
Jimmacle16mo 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
Pobiega16mo 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
Jimmacle16mo 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
Pobiega16mo 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 K16mo ago
What about removing the Repository then re-initilize it ?
Pobiega
Pobiega16mo 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 K16mo 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
Pobiega16mo 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 K16mo ago
I saw you mentioned before the Forks, is it a GIT Tool ??
Pobiega
Pobiega16mo ago
yup
Pobiega
Pobiega16mo 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
Pobiega16mo ago
looks like this
M B V R K
M B V R K16mo ago
Is it free ?
MODiX
MODiX16mo 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
Accord16mo 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.