首页 > 其他 > 详细

git操作常用

时间:2020-06-20 20:12:29      阅读:80      评论:0      收藏:0      [点我收藏+]

用户认证配置
git config--global user.name "your_account"
git config –globaluser.email youremail@example.com
ssh-keygen -t rsa -C "邮箱"
一路回车即可
~/.ssh 下会生成公钥私钥

初始化仓库,推送远程
git init // 初始化版本库
git add . // 添加文件到版本库(只是添加到缓存区),.代表添加文件夹下所有文件
git commit -m "first commit" // 把添加的文件提交到版本库,并填写提交备注
git remote add origin 你的远程库地址 // 把本地库与远程库关联
git push -u origin master // 第一次推送时

乱码问题
git config --global core.quotepath false
git config --global gui.encoding utf-8

修改远程仓库地址
git remote set-url origin 远程地址

git操作常用

原文:https://www.cnblogs.com/smilem/p/13170006.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!