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.

[Swift5]githubにファイルをコミットしたいが、数が多すぎる時の対処法

Last updated at Posted at 2020-12-18

開発環境

Swift5 xcode12.2
EngineerApp という名前のプロジェクトを作成しているときに起きた問題です。

エラー

スクショ.png
このように、gitにファイルをコミットしようと思った際に、ファイルの数が多過ぎると、コミットができないです。
the working copy “EngineerApp” failed to commit files.
といったメッセージが出てきて、コミットに失敗します。

原因

プロジェクト内に画像などのファイルを追加する際に誤って他のファイルも一緒に入れてしまった。自分の場合は、Macの中のダウンロードフォルダのデータが全て入ってしまってました。

対処方法

ターミナルで下記を実行してターミナルを閉じ、プロジェクトを再起動し、再びコミット

cd EngineerApp
/Applications/Xcode.app/Contents/Developer/usr/bin/git reset

参考

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?