git上传本地文件夹

1、下载githttps://git-scm.com/download/win,并安装
2、建立一个本地文件夹,存放需要上传的文件
3、桌面右键->更多选项->Open Git bash
4、cd /e/yourfilefloder进入文件夹
5、执行git init,生成.git文件
5、git add .将整个文件夹加入本地缓存,git add test.txt把指定文件加入缓存
6、git commit -m “注释”,如果首次运行会提示:

Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

按照提示执行语句就行

git config --global user.name "你的名字"
git config --global user.email "你的邮箱"

7、

git remote add origin 你的gitlab上的远程地址

在这里插入图片描述
若提示fatal: remote origin already exists. 因为已经配置过远程仓库,
使用git remote set-url origin更改配置
使用git remote -v查看远程仓库情况
8、
推送代码到远程仓库

git push -u origin master

linux系统,则更改前三部操作即可
参考文章:

https://blog.csdn.net/GUOER007/article/details/131949910

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值