1

I had binary sdk 1.0 in git then upraded to 1.1

1.1 turned out to be trash, so I have rolled back to 1.0

Would git pollute the storage with yet another copy of 1.0 or is it optimized to reuse older binaries?

Anton Tropashko
  • 4,982
  • 3
  • 36
  • 58
  • Have you use `git reset --hard ` to get back to your last commit for v1.0 ? – itshosyn Jul 07 '21 at 14:47
  • Also [This article](https://stackoverflow.com/questions/4114095/how-do-i-revert-a-git-repository-to-a-previous-commit) can help – itshosyn Jul 07 '21 at 14:48
  • I need the rest of the changes that happened since then. Only 3rd party SDK needs unroilling hence reset of the whole tree to a given commit is not an option. – Anton Tropashko Jul 07 '21 at 14:53
  • 3
    Git will always reuse a 100%-unmodified file. (It's usually best not to store the sdk binaries in the repository at all though: if you can make a future project just *use* the sdk, rather than *storing* it, that is usually the way to go.) – torek Jul 07 '21 at 15:04
  • Then using `git diff` is a better and cleaner option for just seeing the changes of that commit and revert it manually – itshosyn Jul 07 '21 at 15:04
  • 1
    ok, thanks torek, having incomplete project without an ability to rebuild it as it was at some point in time is abvolutely not an option. Thanks for clarifying that the binaries will be reused and no space needlessly wasted: you've answered the original question. – Anton Tropashko Jul 07 '21 at 15:15
  • What is your question? It is not at all clear what you are asking here. Please [edit] your question. – Cody Gray Jul 07 '21 at 15:26
  • "Would git pollute the storage with yet another copy of 1.0 or is it optimized to reuse older binaries?" is the question. it beats me why you closed the question – Anton Tropashko Jul 12 '21 at 09:46

0 Answers0