git使用

只提交修改的文件,其他文件忽略的方法

1、git status //查看修改文件状态

2、git add //将想要提交的文件add到本地库

4、git status //查看修改文件状态

3、git commit //提交add到本地库的文件

5、git stash //将其他修改文件

6、git pull origin dev //拉取远程代码合并到本地

7、git push 提交commit的文件

8、git stash pop //回复存储区的文件

出现大文件的git

如果出现下面的这些错误

Enumerating objects: 1347, done.
Counting objects: 100% (1347/1347), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1256/1256), done.
Writing objects: 100% (1328/1328), 871.38 MiB | 2.10 MiB/s, done.
Total 1328 (delta 11), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (11/11), completed with 5 local objects.
remote: error: Trace: 13b24925288d5e3a1d3a66afcb3113bcc48605dc2c5fc062ccc04535369856b1
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File 课件笔记源码资料.zip is 841.36 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To https://github.com/ypy12/Java-learn.git
 ! [remote rejected] master -> master (pre-receive hook declined)

可以尝试

git rm --cached giant_file
# Stage our giant file for removal, but leave it on disk

git commit --amend -CHEAD
# Amend the previous commit with your change
# Simply making a new commit won't work, as you need
# to remove the file from the unpushed history as well

git push
# Push our rewritten, smaller commit

如果不能解决请见大佬博客:

https://blog.csdn.net/u012390519/article/details/79441706

push错误

fatal: unable to access 'https://github.com/ypy12/Java-learn.git/': OpenSSL SSL_read: Connection was reset, errno 10054

可以尝试使用下面的代码行:

git config --global http.sslVerify "false"

然后再push

git status出现Your branch is behind ‘origin/master’ by 4 commits, and can be fast-forwarded.的问题

使用git reset --hard origin/master

Failed to connect to 127.0.0.1 port 1080: Connection refused

使用git config --global --unset http.proxy

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值