9

I made a huge mistake

I got "in the zone", I was coding so nice and fast and everything was working, so I didn't want to commit every single minute and then have to go back, cherrypick commits squash them revert them etc.

So I didn't commit anything at all... Now if I were to commit the commit would modify 2 files, create 26 new files and delete 2 files.

The changes include moving from JS to TS, implementing a desearialization scheme, implementing a server class and wrapper client classes, with common type interfaces for different requests...

So now I need to save my changes somewhere, go back to the last commit and slowly incorporate the changes.

I'm dumb

Comments
  • 2
    git stash?
  • 0
    I created a branch with that SUPER huge commit, the problem is merging the changes back into the feature branch so that it's not everything in a single commit
  • 1
    Checkout files and then commit?... Also remember git add --patch... Or check the next comment...
  • 0
    What about merging solving conflicts and then splitting huge commit? git rebase interactive ? (Check the scm git)
  • 1
    If all those changes were for the same feature/purpose, then I see no reason not to commit a single commit.

    A lot of people do that all the time using `git merge --squash` (myself included)
  • 0
    If I were to commit the whole thing, the message would be "Implement everything" hahaha.

    I need to do it with minimal changes to better track progress and decisions
  • 1
    I prefere to do clean commits, since independent file commits would not work at all, most files are related to each other, I want the code to work in all the commits even if partially
  • 0
    @Positive07 if it all works just mash it in. πŸ‘ŒπŸΌπŸ˜ No regrets!
  • 0
    Hahaha my partner would hate me hahaha of course I have pushed this branch to "test" which is the branch that precedes "dev" which precedes "beta" and so on...

    But I would like a clean history for "dev" since I made some serious design choices when writing the different parts of the code
Add Comment