linux
git initgit
git add . github
git commit -m '这里是日志记录'shell
git log 查看ssh
git remote add origin 连接ide
git pushfetch
问题:spa
fatal: 当前分支 master 没有对应的上游分支。
为推送当前分支并创建与远程上游的跟踪,使用
git push --set-upstream origin master
git push --set -upstream origin master日志
问题:ip
To github.com:Testsoso/swiperGGG.git
! [rejected] master -> master (fetch first)
error: 没法推送一些引用到 'git@github.com:Testsoso/swiperGGG.git'
提示:更新被拒绝,由于远程仓库包含您本地尚不存在的提交。这一般是由于另外
提示:一个仓库已向该引用进行了推送。再次推送前,您可能须要先整合远程变动
提示:(如 'git pull ...')。
提示:详见 'git push --help' 中的 'Note about fast-forwards' 小节。
cat ~/.ssh/id_rsa
ssh-keygen -t rsa -C "你的邮箱"
复制到github制做ssh 尝试链接:
ssh git@github.com
出现:
PTY allocation request failed on channel 0
Hi Testsoso! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
git fetch origin
git merge origin/master
问题:
fatal: 拒绝合并没有关的历史
git branch --set-upstream-to=origin/master master
git pull --allow-unrelated-histories
git push