Z
Z
zlodiak2018-02-09 21:28:35
git
zlodiak, 2018-02-09 21:28:35

How to rollback unstaged changes?

There are several files under the git.
1. I make changes to one of them (for example, I add text)
2. I create another file
3. The git add command. I don't
. Now I would like to roll back the changes. What command should I use for this?
I must say right away that it git reset --hardwill roll back the changes in the file, but will NOT delete the created file. This solution does not suit me
. The command git clean -d -x -fwill delete the created file, but will not roll back the changes in the previously existing file

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
youngmysteriouslight, 2018-02-09
@zlodiak

And what about
or is it important for you to have exactly one team?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question