Git:fatal: I don't handle protocol 'git@https'/error:Cannot pull with rebase

1、git pull [email protected]/{user name}/{repository name}.git /  git push -u origin master

fatal: I don't handle protocol 'git@https'

远程仓库问题,解决:git remote add origin https://github.com/{user name}/{repository name}.git

2、git remote add origin https://github.com/{user name}/{repository name}.git

fatal: remote origin already exists

远程仓库已经存在,解决:$ git remote remove origin

$ git remote add origin https://github.com/{user name}/{repository name}.git

3、git push -u origin master

Username for 'https://github.com': *
                                     To https://github.com/*/*.git
                                     ! [rejected]        master -> master (fetch first)
                                    error: failed to push some refs to 'https://github.com/*/*.git'
                                    hint: Updates were rejected because the remote contains work that you do
                                    hint: not have locally. This is usually caused by another repository pushing
                                    hint: to the same ref. You may want to first integrate the remote changes
                                    hint: (e.g., 'git pull ...') before pushing again.
                                    hint: See the 'Note about fast-forwards' in 'git push --help' for details.

远程README.md不在本地目录,$ git pull --rebase origin master获取远程仓库文件

                                                   $ git push -u origin master重新上传

3、git pull -rebase origin master
error:Cannot pull with rebase:You have unstaged changes.

error:Additionally,your index contains uncommitted changes.

$ git stash

$ git pull -rebase origin master

$ git stash pop


你可能感兴趣的:(CVS,GIT,GITHUB)