- 浏览: 513864 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (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 1534源:https://stackoverflow.com/que ... -
git远程分支与本地分支回退版本
2017-10-13 15:20 2450源:http://www.jianshu.com/p/0b50 ... -
Git Stash方法
2015-08-24 00:44 473源:http://blog.sina.com.cn/s/blo ... -
github免登陆提交commit
2015-04-27 19:58 990源:https://help.github.com/artic ... -
git remote config命令 常用参数 详解
2015-04-27 19:55 1175源: git初始化之git config http://blo ... -
为毛Github的contributions贡献值不增长了
2015-04-22 17:19 526源:http://blog.csdn.net/kkklovey ... -
Git fetch和git pull的区别
2014-10-20 01:40 750源:http://blog.csdn.net/hudashi/ ... -
git process crashed in this repository earlier
2014-10-08 23:38 653源:http://blog.csdn.net/wh_19910 ... -
.gitignore
2014-10-07 19:16 401.metadata bin/ tmp/ local.prope ... -
git 搭建服务器笔记
2014-10-09 17:45 1123源:http://git-scm.com/book/zh/%E ... -
git remote用法总结
2014-07-10 19:05 531源:http://blog.csdn.net/xiruanli ... -
怎么修改Git remote add时使用的远程仓库?
2014-07-10 19:04 854源:http://www.douban.com/group/t ... -
初学GIT 笔记 (3) GIT 的核心命令和结构
2014-07-10 18:58 391源:http://www.douban.com/group/t ... -
Git 的origin和master分析
2014-07-10 17:37 541源:http://lishicongli.blog.163.c ... -
如何在window上把你的项目提交到github
2013-06-24 17:24 895源: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即可
error: failed to push some refs to 'git@gitee.com:yanxiaoxin98/hair.git' 死都push不上去
解决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....
在使用IntelliJ IDEA(简称Idea)进行Git操作时,有时可能会遇到“Сannot Run Git Cannot identify version of git executable: no response”的错误提示。这个错误意味着Idea无法找到或识别本地安装的Git版本,...
问题描述: 在使用git 进行提交时, 出现上面这个报错, 导致无法提交. 报错大致意思就是创建index.lock文件失败,因为已经存在index.lock文件了. index.lock文件是在.git下面, 而.git是一般是隐藏的, 那么可以通过以下...
6. Git push: 将本地 Git 仓库推送到服务器 7. Git fetch: 从服务器下载 Git 仓库,但不合并到本地仓库 8. Git checkout: 切换分支 9. Git branch: 创建、查看和删除分支 10. Git merge: 合并分支 11. Git config: ...
Git教程:Git是分布式版本控制系统,它允许开发者追踪和管理代码变更,对于团队协作和项目管理至关重要。在本教程中,我们将深入理解Git的基础概念,包括仓库、分支、提交、合并以及远程仓库等核心概念。 1. **Git...
### Git Push 常见用法详解 #### 概述 `git push` 是一个用于将本地仓库中的更改同步到远程仓库的命令。通过执行 `git push`,开发者能够将本地所做的修改、新添加的文件或者对现有文件的更改同步到远程仓库中,...
9. **git push (-u)** 和 **git branch (-u)**:`push`命令用于将本地仓库的更改推送到远程仓库。`-u`或`--set-upstream-to`用于设置或更新远程跟踪分支。`git branch -u`可以设置或更新本地分支与远程分支的追踪...
基础命令: 设置用户信息:git config --global user.name "itcast",git config --global user.email "hello@itcast.cn" 查看配置信息:git config --list 获取Git仓库的两种方式: 在本地初始化一个Git...git push
Git是一个开源的分布式版本控制系统,它最初由Linus Torvalds在2005年...5. 远程仓库交互:通常通过`git clone <仓库地址>`克隆远程仓库到本地,或者使用`git push <远程仓库名> <分支名>`将本地更改推送到远程仓库。
Gitkube: 使用git push构建Docker镜像并将其部署到Kubernetes
git push -u origin main -f Git日常使用命令 以下是Git日常使用的一些命令: * git status:查看当前仓库的状态 * git log:查看提交记录 * git branch:查看当前分支 * git checkout <branch>:切换到指定分支 ...
* `git remote add origin git+ssh://git@192.168.53.168/VT.git`: 增加远程定义(用于 push/pull/fetch) * `git branch`: 显示本地分支 * `git branch --contains 50089`: 显示包含提交 50089 的分支 * `git ...
Gitpush node.js 脚本 git push aremote abranch 吗和gitpush(假设源主) 或者gitpush abranch(假设源远程) 或者gitpush 分支远程 安装 git 克隆cd gitpush npm 链接
"Git 命令行从 GitHub 或服务器上克隆、修改和更新项目" Git 命令行从 GitHub 或服务器上克隆、修改和更新项目是版本控制系统中的一个重要操作。下面将详细介绍整个过程中涉及到的知识点。 步骤一:创建本地仓库 ...
如何用git将本地项目push到GitHub上?如何用git将本地项目push到GitHub上?
开发案列优质学习资料资源工具与案列应用场景开发文档教程资料