M
M
Madion2017-05-03 16:30:45
git
Madion, 2017-05-03 16:30:45

How to roll back changes to an uncommitted state?

Help out guys!
Kodil-kodil, but forgot to commit. Then I switched to the old commit. And how now to return my new code, which I did not have time to commit?
Don't kick too hard, I'm new to git.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Timofeev, 2017-05-03
@webinar

If you used an IDE, then you probably stayed there. Git doesn't have them, but an IDE like php storm has its own version control (although it's probably more correct to say just a changelog) and your latest edits can be there.

V
Victor, 2017-05-03
@v_decadence

I'm afraid not. Git has no idea what hasn't been committed.

E
Evgeny Svirsky, 2017-05-03
@e_svirsky

If you switched to an old commit, then your changes were left on top, and if there were no conflicts, then just switch to the previous branch and commit. All after all happens on the same computer?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question