0
0

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 5 years have passed since last update.

【Rails5】Docker環境での別ブランチからのgit commit失敗の対策

0
Posted at

初めてのDocker環境で、Railsアプリを作成中。
別ブランチからのコミットが失敗し解決までに時間がかかったので、
同じエラーが出てもすぐに対処できる様に備忘録として記載します。

原因

.postgesディレクトリをgit管理していたため

解決策

・ .gitignoreに.postgresを記載
→その後pushしてもgithubには残ったまま

.gitignoreに記載したのに反映されない件
→こちらのページを参考にキャッシュをして、
コミットからpushしたらgithub上から消えました!

その後、別ブランチを作成しコミット、pushまでできたことを確認。

ただ、エラーの出たブランチに切り替えたら、同じエラーが出てしまったので、
今日やってた作業のほとんどは消えてしまいました。。。

また、一から頑張りたいと思います!!

まとめ

プログラミング初心者の自分なので、
勇気を持ってTeratailに投稿してみましたが、
全然いい答えは帰ってこないのですし、
答えもせず、馬鹿にしてくる様な人が多いので、
今後は自分でエラーを解決できる能力を高めるしかないなと思いました(o'∀')ノ

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?