QtCreator配置Git方法

1

在Qt中新建工程

2

工具-Git-创建仓库

3

在Github创建一个新的repositories

4

按提示输入

➜  echo "# " >> README.md
➜  git add README.md
➜ git commit -m "first commit"
[master (根提交) 8e8155c] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 README.md
➜ git remote add origin https://github.com/...
➜ git push -u origin master


5

切换到Qtcreator中,如果Git选项中manage remotes为空,添加name和url

name为origin

6

git选项中 commit

push

Github上应该出现了新的文件




如何避免git每次提交都输入密码 from https://zhidao.baidu.com/question/371172649222088564.html?qbl=relate_question_1&word=Qt%CA%B9%D3%C3git%C3%BF%B4%CE%B2%BB%D2%AA%B6%BC%CA%E4%C3%DC%C2%EB

vim /home/chinaestone/.git-credentials

输入内容
https://{username}:{password}@github.com

保存退出后执行下面命令
git config --global credential.helper store

执行完后
/home/chinaestone/.gitconfig 会新增一项
helper = store
这是再执行git push/pull的时候就不会在要求输入密码了

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值