- 浏览: 495693 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (563)
- 工作经验 (12)
- 数据库 (13)
- Servlet (10)
- Struts2 (1)
- Spring (25)
- Eclipse (5)
- Hibernate (5)
- Eclips (8)
- HTTP (7)
- J2EE (21)
- EHcache (1)
- HTML (11)
- 工具插件使用 (20)
- JPA (2)
- 杂谈 (17)
- 数据结构与算法 (3)
- Cloud Foundry (1)
- 安全 (10)
- J2SE (57)
- SQL (9)
- DB2 (6)
- 操作系统 (2)
- 设计模式 (1)
- 版本代码管理工具 (13)
- 面试 (10)
- 代码规范 (3)
- Tomcat (12)
- Ajax (5)
- 异常总结 (11)
- REST (2)
- 云 (2)
- RMI (3)
- SOA (1)
- Oracle (12)
- Javascript (20)
- jquery (7)
- JSP自定义标签 (2)
- 电脑知识 (5)
- 浏览器 (3)
- 正则表达式 (3)
- 建站解决问题 (38)
- 数据库设计 (3)
- git (16)
- log4j (1)
- 每天100行代码 (1)
- socket (0)
- java设计模式 耿祥义著 (0)
- Maven (14)
- ibatis (7)
- bug整理 (2)
- 邮件服务器 (8)
- Linux (32)
- TCP/IP协议 (5)
- java多线程并发 (7)
- IO (1)
- 网页小工具 (2)
- Flash (2)
- 爬虫 (1)
- CSS (6)
- JSON (1)
- 触发器 (1)
- java并发 (12)
- ajaxfileupload (1)
- js验证 (1)
- discuz (2)
- Mysql (14)
- jvm (2)
- MyBatis (10)
- POI (1)
- 金融 (1)
- VMWare (0)
- Redis (4)
- 性能测试 (2)
- PostgreSQL (1)
- 分布式 (2)
- Easy UI (1)
- C (1)
- 加密 (6)
- Node.js (1)
- 事务 (2)
- zookeeper (3)
- Spring MVC (2)
- 动态代理 (3)
- 日志 (2)
- 微信公众号 (2)
- IDEA (1)
- 保存他人遇到的问题 (1)
- webservice (11)
- memcached (3)
- nginx (6)
- 抓包 (1)
- java规范 (1)
- dubbo (3)
- xwiki (1)
- quartz (2)
- 数字证书 (1)
- spi (1)
- 学习编程 (6)
- dom4j (1)
- 计算机系统知识 (2)
- JAVA系统知识 (1)
- rpcf (1)
- 单元测试 (2)
- php (1)
- 内存泄漏cpu100%outofmemery (5)
- zero_copy (2)
- mac (3)
- hive (3)
- 分享资料整理 (0)
- 计算机网络 (1)
- 编写操作系统 (1)
- springboot (1)
最新评论
-
masuweng:
亦论一次OutOfMemoryError的定位与解错 -
变脸小伙:
引用[color=red][/color]百度推广中运用的技术 ...
Spring 3 mvc中返回pdf,json,xml等不同的view -
Vanillva:
不同之处是什么??
Mybatis中的like查询 -
thrillerzw:
转了。做个有理想的程序员
有理想的程序员必须知道的15件事 -
liujunhui1988:
觉得很有概括力
15 个必须知道的 Java 面试问题(2年工作经验)
源:http://blog.csdn.net/fudesign2008/article/details/8692696
评:
@see http://www.thebuzzmedia.com/git-tip-git-push-no-refs-in-common-and-none-specified/
Git is a source-control tool used by software developers.
I recently switched from Subversion to Git and while things have been mostly smooth, there have been a few “WTF?” moments. I am going to try and blog the few beginner ones I ran into in hopes of helping anyone else.
Today I ran a ‘git push’ to shove my commits from my local repository back into the main remote repo, the result was this:
$ git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
error: failed to push some refs to 'git@github.com:painfreepr/<repo>.git'
The odd bit is that I had just done this with a previous repo about 30 mins ago and it worked fine; this was a new repository I was setting up. As it turns out this is the result of originally cloning an empty repository (link, link) which is exactly what I did. I had created a new repo on GitHub and wanted to pull the repo down in IntelliJ to then add some files to it via the GUI instead of from the command line; so I had checked out the empty repo right after creating it.
The fix, fortunately, is dead easy:
$ git push origin master
Doing this should provide output like:
$ git push origin master
Counting objects: 568, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (559/559), done.
Writing objects: 100% (568/568), 2.28 MiB | 2.18 MiB/s, done.
Total 568 (delta 205), reused 0 (delta 0)
To git@github.com:painfreepr/<repo>.git
* [new branch] master -> master
It is my understanding that the core issue is that there are no files in commonbetween the original remote repo you cloned (empty) and the one on-disk (now full of files). Doing the git-push-origin-master shoves your repo up into the empty repository and gives you that common base again so you can do a ‘git push‘ without issue.
Happy Git’ing!
评:
@see http://www.thebuzzmedia.com/git-tip-git-push-no-refs-in-common-and-none-specified/
Git is a source-control tool used by software developers.
I recently switched from Subversion to Git and while things have been mostly smooth, there have been a few “WTF?” moments. I am going to try and blog the few beginner ones I ran into in hopes of helping anyone else.
Today I ran a ‘git push’ to shove my commits from my local repository back into the main remote repo, the result was this:
$ git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
error: failed to push some refs to 'git@github.com:painfreepr/<repo>.git'
The odd bit is that I had just done this with a previous repo about 30 mins ago and it worked fine; this was a new repository I was setting up. As it turns out this is the result of originally cloning an empty repository (link, link) which is exactly what I did. I had created a new repo on GitHub and wanted to pull the repo down in IntelliJ to then add some files to it via the GUI instead of from the command line; so I had checked out the empty repo right after creating it.
The fix, fortunately, is dead easy:
$ git push origin master
Doing this should provide output like:
$ git push origin master
Counting objects: 568, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (559/559), done.
Writing objects: 100% (568/568), 2.28 MiB | 2.18 MiB/s, done.
Total 568 (delta 205), reused 0 (delta 0)
To git@github.com:painfreepr/<repo>.git
* [new branch] master -> master
It is my understanding that the core issue is that there are no files in commonbetween the original remote repo you cloned (empty) and the one on-disk (now full of files). Doing the git-push-origin-master shoves your repo up into the empty repository and gives you that common base again so you can do a ‘git push‘ without issue.
Happy Git’ing!
发表评论
-
Warning: Permanently added to the list of known hosts
2018-11-01 16:35 1411源:https://stackoverflow.com/que ... -
git远程分支与本地分支回退版本
2017-10-13 15:20 2415源:http://www.jianshu.com/p/0b50 ... -
Git Stash方法
2015-08-24 00:44 433源:http://blog.sina.com.cn/s/blo ... -
github免登陆提交commit
2015-04-27 19:58 954源:https://help.github.com/artic ... -
git remote config命令 常用参数 详解
2015-04-27 19:55 1131源: git初始化之git config http://blo ... -
为毛Github的contributions贡献值不增长了
2015-04-22 17:19 496源:http://blog.csdn.net/kkklovey ... -
Git fetch和git pull的区别
2014-10-20 01:40 711源:http://blog.csdn.net/hudashi/ ... -
git process crashed in this repository earlier
2014-10-08 23:38 613源:http://blog.csdn.net/wh_19910 ... -
.gitignore
2014-10-07 19:16 347.metadata bin/ tmp/ local.prope ... -
git 搭建服务器笔记
2014-10-09 17:45 1097源:http://git-scm.com/book/zh/%E ... -
git remote用法总结
2014-07-10 19:05 473源:http://blog.csdn.net/xiruanli ... -
怎么修改Git remote add时使用的远程仓库?
2014-07-10 19:04 814源:http://www.douban.com/group/t ... -
初学GIT 笔记 (3) GIT 的核心命令和结构
2014-07-10 18:58 366源:http://www.douban.com/group/t ... -
Git 的origin和master分析
2014-07-10 17:37 519源:http://lishicongli.blog.163.c ... -
如何在window上把你的项目提交到github
2013-06-24 17:24 847源:http://michaelye1988.iteye.c ...
相关推荐
学习git的基本操作时,遇到问题error: failed to push some refs to 'https://gitee.com/xiao-longlong/git-test.git' 解决办法:先执行git pull --rebase origin master 然后执行git push origin master即可
解决fatal:remote error:You can’t push to git://github.com/username/*.git问题的办法 今天Git push的时候 fatal:remote error: You can't push to git://github.com/username/*.git Use git@github....
主要介绍了解决idea 拉取代码出现的 “ Сannot Run Git Cannot identify version of git executable: no response“的问题,需要的朋友可以参考下
GitMan:基于Git的网盘式文件同步工具.zip,GitMan:基于Git的网盘式文件同步工具
问题描述: 在使用git 进行提交时, 出现上面这个报错, 导致无法提交. 报错大致意思就是创建index.lock文件失败,因为已经存在index.lock文件了. index.lock文件是在.git下面, 而.git是一般是隐藏的, 那么可以通过以下...
基础命令: 设置用户信息:git config --global user.name "itcast",git config --global user.email "hello@itcast.cn" 查看配置信息:git config --list 获取Git仓库的两种方式: 在本地初始化一个Git...git push
Github—failed to push some refs to ‘https://github.com/***/git_project.git’解决办法报错详情 报错详情 git version 2.26.2.windows.1 因为没有提交内容到master,需要先提交 先设置User.email、user.name ...
Gitkube: 使用git push构建Docker镜像并将其部署到Kubernetes
Gitpush node.js 脚本 git push aremote abranch 吗和gitpush(假设源主) 或者gitpush abranch(假设源远程) 或者gitpush 分支远程 安装 git 克隆cd gitpush npm 链接
如何用git将本地项目push到GitHub上?如何用git将本地项目push到GitHub上?
error: failed to push some refs to 'git@gitee.com:yanxiaoxin98/hair.git' 死都push不上去
5.git push <remote> <branch>:将本地分支推送到远程仓库 分支管理 6.git branch:列出所有本地分支 7.git branch <name>:创建一个新的本地分支 8.git checkout <name>:切换到指定分支 9.git merge <branch>:将...
常用的git命令完整详细109条 Git是一个很强大的分布式版本控制系统,以下是一些常用的git命令: ...8. git push (-u) 与 git branch (-u):将本地仓库的修改推送到远程仓库,以及创建并切换到新的分支。
git指令快速查询 git branch 查看本地所有分支 git status 查看当前状态 git commit 提交 git branch -a 查看所有的分支 git branch -r 查看远程所有分支 git commit -am "init" 提交并且加注释 git remote add ...
Learn the Git versions of common source management concepts and commands Track changes, work with branches, and take advantage of Git′s full functionality Avoid trip–ups and missteps common to new ...
Git push 常见用法,git里面help 可以帮助我们查看。这个文档只是补充。。
Learn the Git versions of common source management concepts and commands Track changes, work with branches, and take advantage of Git's full functionality Avoid trip-ups and missteps common to new ...
彻底解决Mac端git clone/push速度太慢的问题,详情请参阅文档。
开源项目-bobbo-git-s3-push.zip,git-s3-push: Deploy git repos to Amazon S3, written in Go
{ "BasePath": "D:\\Git", "GitPath": "git" }需要先安装Git,并确保git命令可以执行GitPath可以是git的绝对路径,如在Windows下: C:\\Program Files\\Git\\bin\\git.exe功能已完成创建仓库浏览仓库git客户端push ...