Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kamen67774yBeen there, done that. First months at my first job, I somehow decided it's a good idea to commit a 1 GB .PSD.
Can't remember how and whether I fixed it at all (I must've), but what I'd try now is resetting the local branch to the commit just before adding the file, then force pushing. I'm not a git expert, but that sounds about right to me. I might be wrong of course. -
crisz81124y@kamen that's a good idea, but I should go 7 commits back, and I don't even know if it's now possible
-
crisz81124ynow I deleted the files through "git filter-branch", I'm trying "git push --force", and it's pushing 3000 objects. What the hell is it pushing?
-
* backup file
* delete file
* comit "deleted"
* restore file
* add to gitignore
comit
optional : SquashCommits so noone can see that ;p -
The point of version control is to show the history. It shouldn't be easy to rewrite history.
@NoToJavaScript it's still in the repo after that, and everyone has to download it if cloning the full history of that branch -
Voxera108954y@fzammetti having worked with three different version controls before git I can say git is the best so far.
Sure there might come something better but git has survived and replaced most of the older ones.
You just have to really follow the rules OR learn how it really does work to be able to fix problems.
But many of the older ones was worse in that once you had done something stupid you could not easily back track.
You might have to manually setup versions to preserve and any changes in between would be lost :/ -
atheist90774yGit, compared to svn, is good. If you're having so many problems, use a gui. Gitkraken is pretty good. It even let's you undo changes to the repo.
-
atheist90774y@NoToJavaScript Git always downloads the full history, there's no difference between client and server. For text repos that's fine. I've seen several gb build tools in a repo, made it a bit slower but from a local server, no biggie
-
kamen67774y@NoToJavaScript There's the "--depth" flag that can be added (with a numeric argument denoting the number of commits including the last one) when cloning, but unless you provide that flag, full history of the repo is cloned.
https://stackoverflow.com/questions... -
crisz81124y@neeno yes but I wanted to remove a file from a commit, not a commit. I've solved now, I'll try it the next time just in case, thank you.
By the way, also the worst designed software can be used if you learn how to use it. That's what make it bad designed, you've to learn it by heart.
For example, what's the purpose of ~ in your solution? I should do some research for that, and it could have been avoided -
Voxera108954y@neeno very true.
Also, git was designed specifically for managing the linux kernel and follows the same philosophy as most linux tools.
Its a command line tool that does one task, version control, and it is powerful.
It was never designed with friendly for beginners in mind but for managing the most complex software projects that exists.
I mean, Microsoft have replaced their own tool with git for windows, that is a good sign its a good tool.
And to be honest, once you need some of the more complex features, git IS easy to use compared to all previous tools. And i switched from using a gui version just because I found that it hid to much of the features.
Related Rants
I had mistakenly added a large file to a commit, and I'm now spending 3 hours of my life just to remove it and being able to push.
I've deleted the file from tracking, but it remained in history so when I try to push, github rejects to continue.
And, still worse, trying various solutions on StackOverflow I've done a mess on the history which now looks unrelated to the remote one, and I think it's a never-end catastrophe.
It's absurd how badly designed is git, and how hard it is to use besides the 3 commands that you learnt by heart
rant
git
sucks
github