@wuxin1994
2017-10-23T13:16:57.000000Z
字数 798
阅读 1026
Linux
$ git commit -m "first commit"On branch masterUntracked files:.gitignore_config.ymlgitgit.pubpackage-lock.jsonpackage.jsonscaffolds/source/themes/nothing added to commit but untracked files present
这个错误原因有两个:
1. 已经存在的项目?
2. 没有把需要提交的文件加载进来,所以需要用
git add (文件名)
fatal: remote origin already exists.
用到的解决办法:
1. 删除远程仓库,再添加远程仓库
$git remote rm origin$git remote add origin git@github.com:wufans/wufans.github.io.git
$vi .git/config
删除[remote "origin"]
To github.com:wufans/wufans.github.io.git! [rejected] master -> master (non-fast-forward)'git@github.com:wufans/wufans.github.io.git'hint: Updates were rejected because the tip of your current branch is behindhint: its remote counterpart. Integrate the remote changes (e.g.hint: 'git pull ...') before pushing again.
这个方法就是因为本地仓库和github上面仓库的内容有冲突导致的
我用的解决办法是删除了原来的repository,重新建立了一个仓库,问题解决。
