一、提交问题
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
解决:
输入:git remote add origin git@github.com:yourusername/test.git,然后再重新提交
其中yourusername就是github的账号,test就是需要提交代码的仓库名。
二、add时候的警告
The file will have its original line endings in your working directory warning: LF will be replaced
解决:
过程:在项目根目录打开bash命令界面
1、初始化 git init : 生成一个.git文件夹(隐藏的)
2. git add . 将项目内容add到缓存区
3.git commit -m "first commit" :提交注释
4.git remote add origin xxxxx(git复制的路径):用于连接远程git库
5.git push -u origin master :从缓存区提交到源git路径库
结果: