3 ms·
> as long as I keep their hashes that means my hashes or their hashes or them keeping my hashes, I am never sure
by janpeuker 3mo ago
> as long as I keep their hashes
that means my hashes or their hashes or them keeping my hashes, I am never sure
- selckin 3mo agoyou can just make a backup copy of .git or your entire project dir. When you get lost, just delete your .git, copy from the backup and try again
- delusional 3mo agoYou never need to do that. git-reflog(1) is the most general solution if you will ever need.
- selckin 3mo agoif you're a beginner thats going to be very difficult, restoring the git dir a few times makes the learning process much faster, till it all clicks and you don't need too anymore
- roryirvine 3mo agoBut then you have multiple copies of your repo which is inevitably going to end up with a my_project_v2_FINAL_3b/ mess, reminiscent of how people used to manage files before version control. Not having to deal with all that is exactly what git is for.
- Vinnl 3mo agoI'm pretty comfortable with Git, but I've still done this a number of times, and in my experience this situation is very evitable. After I've completed my gnarly process (whether successfully or unsuccessfully), I just delete the folder I don't want to use.
- herywort 3mo agoIs this a joke? git's whole purpose is to save the history of your project and return to earlier versions when needed
- Vinnl 3mo agoIt's a super simple solution for which you can be certain that you have all the knowledge needed to perform the restore operation.