I often forget to push a few things depending on how Git decides to label my work. Today it labeled a move as a file deletion and add, and only the deletion is present on the upstream, and now the upstream doesn't even compile properly. And I don't want to pull out my hair to resolve yet another conflict, because the only help with Git I can get is jUsT reAD ThE WhoLE maNUaL.

One other thing is that I refuse to use VSCode, especially since they're pushing AI slop code generation so much, and I use KATE instead.

all 7 comments

sorted by: hot top controversial new old
[–] 6 points 3 months ago (1 child)

The problem is that uncommited files in the repo isnt unusual, often people have test files or logs, that you dont want to commit.

I personally use git gui, which will show all the files that arent committed, so that may be a solution for you.

  • source
  • hideshow 2 child comments
  • [–] [S] 6 points 3 months ago (1 child)

    Then I add those to .gitignore, so I won't forget the files I need to commit, so I don't have to dive through AI slop articles about git to resolve merge conflicts (often things that should have been automatically resolved, except someone didn't have basic common sense).

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 3 months ago (1 child)

    .gitignore is good for stuff that will always be there, but is less good for small one-off files and other detritus.

    But if your happy maintaining .gitignore correctly, git add . before commit and youll never miss a file again. You may accidentally commit a secrets file, but thats a different problem for a different day.

  • source
  • parent
  • hideshow 2 child comments
  • I just do git status before and after commits

  • source
  • [–] 4 points 3 months ago*

    Add a prepush hook that checks if git status is clean (or some other gir command that lists uncommitted files). If it is, either fail straight away of make the hook interactive and ask whether it's ok or something.

    Maybe https://pre-commit.com/ has something already.

  • source