• no_name_dev_from_hell@programming.dev
    link
    fedilink
    arrow-up
    14
    ·
    8 days ago

    git commit -am is for weirdos.

    You should do a git add .. Then do a git status. Then do git reset because . meant that all the stuff you didn’t want to commit also is now in the staging area, then do a manual git add <dst_path> for your paths. Then do a git add . by accident, and repeat.

    • red_tomato@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      8 days ago

      Not weird. Whenever I use the -a flag on accident I just do git reset HEAD~1, and then do git commit -am on accident again.