git - Cannot commit after reverting one file from previous commit -


what did:

  1. i had file wrongly deleted in previous commit. in "version control" -> "log" clicked "revert selected changes" on file in changelist on right.enter image description here
  2. android studio showed "patch applied"

after nothing happened — didn't appear in changelist. how commit revert?

android studio's "revert" not equivalent git revert. behaves svn revert discarding changes before svn commit, or git checkout -- filepath discarding changes before git add.

it seems android studio not have git revert button. in command line instead. if previous commit touches few files, assuming commit a, git checkout a^ -- filepath "revert" 1 file , add , commit.


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -