一、常用操作
对文件夹右键 选择 "git bash here"
1、 git init
2、git remote add origin master
3、git remote -v //查看远程仓库是否添加成功
4、git pull origin matser
5、git add .
6、git commit -m "description"
7、git push origin master
二、git修改用户名和邮箱
1.找到本机git所在文件夹(我的是在D盘下),打开git-cmd.exe
2.查看用户名
(1)查看当前项目下:
git config user.name
(2)查看全局下:
git config --global user.name
3.查看邮箱
git config user.email
git config --global user.email
4.更改用户名/邮箱
(1)更改当前项目下:
git config user.name xxx
(2)更改全局:
git config --global user.name xxx
三、码云上传下拉vue项目遇到的问题
(一)上传项目
1、解决 “fatal: Could not read from remote repository.“
提示:解决这个问题需要生成一个新的ssh key;
参考:https://blog.csdn.net/weixin_40922744/article/details/107576748
参考:https://blog.csdn.net/hellokandy/article/details/89976156
2、解决: 码云错误 You have successfully authenticated, but Gitee.com does not provide she access
参考:https://blog.csdn.net/qq_39380155/article/details/106229359
3、git下来的项目没有node_modules(没有库)
参考:https://blog.csdn.net/weixin_34237596/article/details/92397304