github使用常见问题

###1.github本地使用多个key 本地多个keyhtml

  • 无论linux仍是win,要在.ssh/下新建个config。

###2. remote origin already existslinux

fatal: remote origin already exists.git

git remote rm origin
git remote add origin git@github.com:name/name.gitgithub

###3. git push后提示 everything up-to-date git服务器

everything up-to-date gitssh

git status 查看状态
git log 查看日志
通常的状况是add或commit失败git commit .net

###4. error:failed to push some refs to.......
执行git push origin master日志

error:failed to push som refs to.......code

解决failed to push some refs to
git pull origin master //把远程服务器github上文件拉回来,再push上去。htm

###5. The following untracked working tree files would be overwritten by checkout:

The following untracked working tree files would be overwritten by checkout: ReadMe.md

git clean -d -fx //不太熟悉
git stash //不太熟悉

###命令详解
git init //当前目录下会建立一个.git的目录
git clone
git add
git commit -m 'comment'
git branch testbranch //建立分支
git checkout testbranch //切换到分支
git branch //查看分支
git branch -r //查看远程全部分支
git branch -a //查看本地和远程的全部分支
git push origin test//提交test分支到远程git库
git reset //不太熟悉
git rebase //不太熟悉

###gitconfig配置文件
win环境下在C:\Documents and Settings$USER下。

20160308添加

github常见错误解决方法

相关文章
相关标签/搜索