I am starting up a new React Native project, and I have gone through many steps to push my current branch. I have already converted over to SSH from https, already run git config --global http.postBuffer 524288000
, pushed a clone of master successfully (no proxy issues or firewall problems), and updated my .gitignore
to be more encompassing of files I dont need to upload to Github. I am afraid there is something too large causing my push to hang while writing objects.
I write: git push -u origin branchName
My terminal responds with:
Enumerating objects: 240, done.
Counting objects: 100% (240/240), done.
Delta compression using up to 16 threads
Compressing objects: 100% (131/131), done.
Writing objects: 61% (131/213), 99.58 MiB | 725.00 KiB/s
The writing objects climbs to 61% and then sits there, the MiB continues to climb but never does anything but continue to grow.
Is there a way to see file sizes in git or see the current object being written to Github using push? I am afraid something in my android or ios folders is causing this problem. I have also already cleared the git cache before trying to add the files and push. Any help is greatly appreciated.
Lastly, here is my .gitignore
:
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
# CocoaPods
/ios/Pods/
Solved this: What you do is first run: git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
to get a list of files in your cache for git. Then for any file that comes back you want gone, run git filter-branch -f --tree-filter 'rm -rf android/java_pid63813.hprof /file/path/1 /file/path/2...etc' HEAD
. Once that is clean, push and it should work!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.