Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
homulilly
on May 26, 2014
|
parent
|
context
|
favorite
| on:
Gitjk – command to undo what you just did in git
Uh... if you want to undo a git add shouldn't you be doing git reset?
mapmeld
on May 26, 2014
[–]
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.
achal
on May 26, 2014
|
parent
[–]
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: