git push -u origin master
error: src refspec master does not match any.
error: 无法推送一些引用到 'origin'
git add *
git commit -m 'update project'
git push -u origin master
ssh: Could not resolve hostname github: Name or service not known
fatal: 无法读取远程仓库。
git pull origin master
git push -u origin master
Warning: Permanently added the RSA host key for IP address 'xx.xx.xxx.xxx' to the list of known hosts.
To [email protected]:hahaha/ftpmanage.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to '[email protected]:hahahah/ftpmanage.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.
git pull --rebase origin master
git pull origin master
fatal: 拒绝合并无关的历史
git push -u origin master
提示:更新被拒绝,因为您当前分支的最新提交落后于其对应的远程分支。
# 远程仓库与本地关联
git branch --set-upstream-to=origin/master master
# 修改信息
# 请输入一个提交信息以解释此合并的必要性,尤其是将一个更新后的上游分支
# 合并到主题分支。
#以 '#' 开头的行将被忽略,而且空提交说明将会终止提交。
# 填写必要信息
# 保存
ctl+x
# 远程仓库同步到本地
git pull --allow-unreleated-histories
git commit -m 'NNTest'
位于分支 master
尚未暂存以备提交的变更:
删除: NNTest.py
删除: images/loss.png
删除: images/results.png
修改尚未加入提交
git status
位于分支 master
您的分支领先 'origin/master' 共 2 个提交。
(使用 "git push" 来发布您的本地提交)
尚未暂存以备提交的变更:
(使用 "git add/rm <文件>..." 更新要提交的内容)
(使用 "git checkout -- <文件>..." 丢弃工作区的改动)
删除: VGGNet/cifa10_data/cifar-10-batches-bin/batches.meta.txt
删除: VGGNet/cifa10_data/cifar-10-batches-bin/data_batch_1.bin
删除: VGGNet/cifa10_data/cifar-10-batches-bin/data_batch_2.bin
删除: VGGNet/cifa10_data/cifar-10-batches-bin/data_batch_3.bin
删除: VGGNet/cifa10_data/cifar-10-batches-bin/data_batch_4.bin
删除: VGGNet/cifa10_data/cifar-10-batches-bin/data_batch_5.bin
删除: VGGNet/cifa10_data/cifar-10-batches-bin/readme.html
删除: VGGNet/cifa10_data/cifar-10-batches-bin/test_batch.bin
删除: VGGNet/cifa10_data/cifar-10-binary.tar.gz
删除:git checkout – <文件名>
git checkout -- VGGNet/cifa10_data
位于分支 master
您的分支领先 'origin/master' 共 2 个提交。
(使用 "git push" 来发布您的本地提交)
无文件要提交,干净的工作区
git push -u origin master
fatal: I don't handle protocol 'git@https'
git push -u origin master
fatal: 'origin' does not appear to be a git repository
fatal: 无法读取远程仓库。
git remote add origin https://github.com/xindaqi/AIFuture.git
git commit -m 'update'
位于分支 master
未跟踪的文件:
images/
models/
提交为空,但是存在尚未跟踪的文件
git pull --rebase origin master
git -T [email protected]
[email protected]: Permission denied (publickey).
sudo git -T [email protected]
The authenticity of host 'github.com (13.250.177.223)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,13.250.177.223' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
cd ~/.ssh
vim id_rsa.pub
# 复制内容,打开github,并登陆
github配置如下
setting ↦ \mapsto ↦ SSH and GPG keys ↦ \mapsto ↦ New SSH Key
git pull origin master
ssh: Could not resolve hostname github: Name or service not known
fatal: 无法读取远程仓库。
请确认您有正确的访问权限并且仓库存在。
git remote add origin https://github.com/xindaqi/AIWeb.git
[参考文献]
[1]https://www.cnblogs.com/zhenglinfei/p/7396758.html
[2]https://www.cnblogs.com/jeremylee/p/5715289.html
[3]https://blog.csdn.net/yamanda/article/details/79375698
[4]https://blog.csdn.net/dream_follower/article/details/53907217