之前那段时间一直没有使用git忘了差不多了
原因: 我是本地之前写好文件没有创建一个git 仓库,然后现在提高上去, 现在本地建了一个git 仓库, 远端也有一个git 仓库, 需要将两者连接起来,
(主要是两个仓库不相关)
在使用git push 时 ,就显示不行了,
然后我就重新使用 git pull
解决: git pull origin master --allow-unrelated-histories
但是git log 会出现 Merge branch 'master'
见添加链接描述
git add git commit -m 与 git commit -am ''
的区别:
添加链接描述