跟我一起用Git
来源:互联网 发布:可牛软件下载 编辑:程序博客网 时间:2024/06/10 21:58
写这篇博文的原因
写这篇博文,是因为自己在使用Git的过程中,着实遇到了很多问题,现在记录下来,一是为了避免以后犯同样的错误,二是给其他人一些参考。
使用TortoiseGit
1.在有一次使用TortioseGit的过程中,我遇到了这样的问题:
Username for ‘https://github.com‘: dummymare
Password for ‘https://dummymare@github.com‘:
To https://github.com/dummymare/Hello-World.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to ‘https://github.com/dummymare/Hello-World.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.
出现这种情况,一般是因为:本地版本和主干上的有差异。。。让你先pull远端的版本,解决了冲突才能push。比如说,当时我的情况是,在Github新建了一个代码库,同时初始化了一个README.MD,建好之后,我马上就从本地Push代码,就出现了这个问题。我的解决办法是,pull远端的README.MD,然后再Push,就没有问题了:
- 跟我一起用Git
- 跟我一起用windows快捷键(持续更新)
- 跟我一起用C++实现Java Thread库(一)
- c语言extern跟static可以一起用吗
- 笔记:TRULY_SPINACH(优酷播单:和我一起用Unity3D玩游戏)
- 跟我学WEBSERVICE(一)
- const和volatile一起用
- Dialog 和 RecyclerView 一起用
- 跟我学AspectJ(一)
- 跟我学AspectJ(一)
- 跟我学XSL(一)
- 跟我学Perl(一)
- 跟我学XSL(一) [Z]
- 跟我一起写 Makefile(一)
- 跟我学Lex and Yacc 一
- 跟我学SQL:(一)数据查询
- 跟我学AspectJ(一)
- 跟我学XSL(一)
- UVA - 1587 Box
- 配置ubuntu和目标板nfs共享
- HDU 1076 An Easy Task(水~)
- Oracle Flashback Technology【闪回技术】
- java中内部方法对外部类变量的引用
- 跟我一起用Git
- HDOJ 5479 Scaena Felix
- 欢迎使用CSDN-markdown编辑器
- P1094 矩形分割|tyvj
- 单向循环链表的实现C++封装
- leetcode | Remove Nth Node From End of List
- ***Binary Tree Maximum Path Sum
- 工科生在科研中一些必备技能总结
- Sublime text 常用插件及安装