git error “Cannot rewrite branch(es) with a dirty working directory”

后端 未结 1 1097
一个人的身影
一个人的身影 2021-02-19 07:02

\"Cannot rewrite branch(es) with a dirty working directory\".

I am new to Git - I tried googling for an answer to no avail.

What does this

1条回答
  •  滥情空心
    2021-02-19 08:00

    A dirty working directory means you have uncommitted changes to your branch. You can either commit them or stash them. To stash just use:

    git stash
    

    And use this to bring your changes back

    git stash apply
    

    0 讨论(0)
提交回复
热议问题