Hacker News new | past | comments | ask | show | jobs | submit login

Uh... if you want to undo a git add shouldn't you be doing git reset?



somehow when I was testing it, I thought I needed to use rm -r --cached to remove a previously untracked file. It should do git reset in most cases.

Edit: now recommends git reset unless you did "git add ." or something like that.


You may have been on your initial commit; in that case, you need to use rm --cached instead of reset to undo a git add.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: