【Git】問題解決: You've added another git repository inside your current repository.

前言

這篇是git上傳時,
碰到以下訊息的解決方法。

You've added another git repository inside your current repository.

解法

簡單來說此問題是因為在git資料夾底下中,
已經存在一個已經建立git的資料夾,
導致git的指令出錯。

我們必須去資料夾底下找尋已經起始 git 的「.git」資料夾 (通常是隱藏的資料夾)
刪除此資料夾後即可正常執行 git 上傳。

示意圖

  • git 資料夾
    • (資料夾內) 曾經 git init 過的資料夾 (必須刪除此 .git 資料夾)
  • Reference

    https://blog.csdn.net/bbtang5568/article/details/82791750

    Licensed under CC BY-NC-SA 4.0