Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Friday, June 15, 2018

Git: The remote end hung up unexpectedly

今天用git push時出現
$ git push
Counting objects: 40, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (35/35), done.
error: RPC failed; curl 56 Recv failure: Connection was reset
fatal: The remote end hung up unexpectedly
Writing objects: 100% (40/40), 1.65 MiB | 1.45 MiB/s, done.
Total 40 (delta 11), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
Everything up-to-date

查找了一下發現原因是上傳時的文件太大導致不允許上傳。
找了一下知道了解決方案︰
  1. 在.git目錄下有一個config文件,打開它。
  2. 在後面加上
    • [http]
    • postBuffer = 524288000
  3. 完成
Reference: git 推送出现 "fatal: The remote end hung up unexpectedly" 解决方案

或者可以用Bash輸入
git config --global http.postBuffer 157286400

Wednesday, September 16, 2015

Github: Windows 上傳檔案

在Windows 上傳文件到Git可以先安裝TortoiseGit, 再安裝Git for Windows.
  1. 先在Git 上建立一個Repository,然後右方就會有個叫個HTTP clone URL複製這個連接。
  2. 然後會發現在電腦目錄中空白地方按右鍵會出現Git GUI Here這個選項,點這個後就選擇Clone Existing Repository,把連接貼上就可以初始化一個目錄。
  3. 以後打開這個目錄後再開啓Git GUI Here,會看到中間下面有五個按鈕
      • Rescan (搜索有沒有文件更新了)
      • Stage Changed (放到準備更新的目錄)
      • Sign Off (簽名)
      • Commit (指定更新哪一個文件)
      • Push (上傳)
    由上至下順序按那五個按鈕就可以上傳了...DONE~~