0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Gitでcheckoutできない現象を解消した

Posted at

gitでcheckoutしようとすると以下のようなエラーが。。。

$ git checkout develop
error: Your local changes to the following files would be overwritten by checkout:
	xxx/__pycache__/urls.cpython-37.pyc
	xxx/__pycache__/views.cpython-37.pyc
	xxx/__pycache__/urls.cpython-37.pyc
Please commit your changes or stash them before you switch branches.
Aborting

よくわからないままstashを実行。

$ git stash

なんかできてそう。

とりあえずpullだな。

$ git pull
From https://github.com/xxxxx/xxxxx
 * branch            master     -> FETCH_HEAD
Already up to date.

これは。。。

$ git checkout
Switched to branch 'develop'

おおおおおおお!
なんで直ったかわからんができた。

これをやる前にも
.git/index.lockを削除するなどいろいろやったので原因がわからない。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?