小伙伴们大家好
多的不讲少的不唠 先看报错
wangfeng@LAPTOP-SNV7J00M MINGW64 /d/Onedrive/桌面
$ git remote add origin https://gitee.com/wang-feng-thomas/123.git
fatal: not a git repository (or any of the parent directories): .git
wangfeng@LAPTOP-SNV7J00M MINGW64 /d/Onedrive/桌面
$ git init
Initialized empty Git repository in D:/Onedrive/桌面/.git/
wangfeng@LAPTOP-SNV7J00M MINGW64 /d/Onedrive/桌面 (master)
$ git remote add origin https://gitee.com/wang-feng-thomas/123.git
wangfeng@LAPTOP-SNV7J00M MINGW64 /d/Onedrive/桌面 (master)
$ git push -u origin "master"
error: src refspec master does not match any
error: failed to push some refs to 'https://gitee.com/wang-feng-thomas/123.git'
最后给我搞了个报错 一时半会不知所出 其实是我们的邮箱没有配置好我们只需要配置一下config即可
1打开你的项目目录
2找到这个目录
你的盘:\你的项目路径\你初始化git的目录\.git 点进去这个git目录
点进去你会看见一个名为config的文件 用你的编辑器打开
如果不出意外你会看见一下内容
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
如果只有这个内容的话就说明你的邮箱没有配置好
复制以下内容粘贴进去
[user]
email=你的邮箱地址
name='你的大名'
再试一次就行了