14 points

Neither remove untracked files sadly.

permalink
report
reply
9 points

git stash my friend

permalink
report
parent
reply
16 points

I think git clean is more appropriate. With git stash you create a stash which you then have to drop.

permalink
report
parent
reply
9 points

Yea but you can always git pop if you need any of your stashed changes

permalink
report
parent
reply
37 points

Who says you have to drop it? I’ve got stuff from 2007 in there somewhere.

permalink
report
parent
reply
1 point

That’s why I follow it with git clean -fd

permalink
report
parent
reply
73 points
*

fuck it. rm -rf repository; git clone repository

Been using git since almost as long as its been around, still can’t be bothered to learn to how to fix conflicts.

permalink
report
reply
18 points

Rename it, so you can run diff on those surprising things that in no way could have changed, but are not equal to the repository. And then delete.

Or keep the X-old; X-backup; X-bkp; X-old-old; X-old3 dirs.

permalink
report
parent
reply
51 points
*

mv .git .git_old7

git init

git add .

git commit -m “almost working”

permalink
report
reply
5 points

Lmao this is perfect

permalink
report
parent
reply
11 points

git restore . ?
Or am I misinterpreting the problem?

permalink
report
reply
18 points

git restore is a pretty new command AFAIK. Those of us who learned git before its existence have probably stuck to the old ways of git reset --hard.

permalink
report
parent
reply
3 points

Yep, I just learned of this command…

permalink
report
parent
reply
5 points

And lose my untracked changes?

https://m.youtube.com/watch?v=guv5LUT1AFw&t=7s

permalink
report
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 7.2K

    Monthly active users

  • 953

    Posts

  • 36K

    Comments