❔ 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 <359 Replies
french
check the actual error message, by clicking "open git log" or check the output window
lol wtf ?
fuckin mega octets lol
ahahahah
but yeah show us the error
omg it takes 30 minutes to show that message
... what?
has pushing worked in the past?
you didn't change anything about the git setup?
When I push the
VS
or VS Code
do more than 20 min of processing then showing those messagesthat sounds weird.
no, everything was fine and I don't change anything
but we need to see the actual error message from git
and you didn't think to save the one message it comes up with at the end of that 😭
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
sometimes I get the
RPC Failed ...
errorin vsc you can actually just open the git output manually
so before you do the push operation
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 crazythe size of the commit shouldn't matter i don't think
might be easier to just open up a normal terminal and do "git status"
90mb isn't that much anyway
and "git fetch"
i don't think there's anything to pull
vsc would show that
fair
I do not use vsc/vs git
would show down as well
yep, that makes sense
vsc + the git kraken extension are godlike for anything git related
fuck learning all the commands
I use terminal for most things, and Fork for the complicated stuff
like rebasing, cherry picking, merges etc
yeah i know like a handful of git commands and that's good enough for me
you can go a long way with just pull, commit, push, branch, checkout
yup
When I do it I get these messages
Do you have any idea ?
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 aboveSo is that means that I should ignore the
angular/cache
from being committed ??you always want to ignore any files like caches, build output, etc.
versioning them isn't meaningful and just bloats your repo
the problem is that you have already committed these files, so you have to screw around with your repo history to remove them
Please do you have any idea about how to ignore them without using
git
commands, I mean only using VS Code
's UIyes, 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
using something like https://github.com/newren/git-filter-repo
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)
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
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
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
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 sourcetreeImho, 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 🙂
What about removing the
Repository
then re-initilize it ?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"
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 ??that would work, but you wouldn't learn anything
but go ahead if you just want this "fixed"
I saw you mentioned before the
Forks
, is it a GIT Tool
??yup
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
looks like this
Is it free ?
Pobiega#2671
You can download and evaluate the Software for free, but need to purchase a license for long-term use.
Quoted by
<@!105026391237480448> from #Can't push a commit to GitHub from VS Code or VS (click here)
React with ❌ to remove this embed.
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.