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.

強化学習36 githubのコミットを削除する

Posted at

中学から大学生までのAI初学者を対象にしています。

chokozainerはgithubをファイル置き場兼公開に使用しています。
ファイル置き場としてはいいのですが、公開用となると、今までのbugfixなどが大量に残っているので、いろいろと問題があります。
まるごとダウンロードしようとすると、全く不要な古いファイルまでのダウンロードされてしまうのです。

そこで、一番最近の状態を残して、過去の全コミットを消去する方法を探しました。
該当するフォルダに移動して、
コンソールで以下のようになります。


git checkout --orphan tmp
git commit -m "Initial Commit"
git checkout -B master
git branch -d tmp

git push origin +master
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?