Git的简单使用
下载:
git命令行代码:
到需要的目录下 git clone +地址
上传:
1.
cd到目录下
git add . 添加到目录
2.
git commit -m "the first mosaicworld"
3.
git push -u origin master
//————————————————————————————————————————————————————————————
遇到这种问题:
wangjundeiMac:mosaicworld wangjun$ git push -u origin master
Counting objects: 15138, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14412/14412), done.
Writing objects: 100% (15137/15137), 6.31 GiB | 1.91 MiB/s, done.
Total 15137 (delta 3907), reused 11 (delta 0)
error: RPC failed; result=22, HTTP code = 500
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
wangjundeiMac:mosaicworld wangjun$
清理缓存:git config http.postBuffer 524288000
解决无效:最后用的sourcetree工具上传成功
//————————————————————————————————————————————————————————————
sourcetree:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree commit -q -F /var/folders/wy/nt57cm6x2jl2hs784x_jvqz80000gn/T/SourceTreeTemp.6st9Jg
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/master:refs/heads/master
Pushing to git@git.yodo1.cn:ctr2/mosaicworld.git
To git@git.yodo1.cn:ctr2/mosaicworld.git
Branch master set up to track remote branch master from origin.
cca6705..07909a6 master -> master
updating local tracking ref 'refs/remotes/origin/master'
Completed successfully

浙公网安备 33010602011771号