git push 提示 Everything up-to-date
第一次在 Google Code 上弄项目,注册完毕后,
尝试增加一个新文件用以测试 Git 是否好好工作。
结果在 Push 时却显示 Every up-to-date,检查文件时却发现实际上一个都没更新上去。
因为对 Git 不够熟悉,因此只好 Googling,进行一番搜索后找到原因如下:
Why does Git refuse to push, saying “everything up to date”?
git push with no additional arguments only pushes branches that exist in the remote already.
If the remote repository is empty, nothing will be pushed.
In this case, explicitly specify a branch to push, e.g. git push master.
也就是说一开始 git 服务器仓库是完全空的,
不包含任何一个分支(branch),因此刚开始 Push 时需要指定一个。
执行 git remote -v 后看到自己的 remote 端名字为 origin:
$ git remote -v
origin https://code.google.com/p/micolog2 (fetch)
origin https://code.google.com/p/micolog2 (push)
执行 git branch 后看到自己当下用的分支是 master:
$ git branch
* master
因此在本地 commit 后,再执行 git push origin master 即可。
git push 提示 Everything up-to-date的更多相关文章
- git push 提示
我运行git push -u origin master 时提示如下: To git@github.com:userName/project.git ! [rejected] master -> ...
- git push提示或错误
当 git 和 gerrit 一起使用的时候,你创建了一个 tag,现在需要 push 到远程仓库,当你没有权限的时候,会出现如下提示: $ git push origin v20150203 Tot ...
- Git push提示pre-receive hook declined
master:local auto@ubuntu:~/src/code/ git push Counting objects: 5, done. Delta compression using up ...
- windows 切换git远程仓库地址后 git push 提示Authentication failed
git切换远程分支: 方法一: git remote set-url origin 你新的远程仓库地址 方法二: git remote rm origin git remote add origin ...
- 转 git push 提示 Everything up-to-date
git 还没有分支,需要指定一个($ git remote -v),就可以push了 第一步:$ git remote -v 第二步:$ git branch 转载链接: http://blog.cs ...
- Git Push提示没有权限
中途协助别人开发的一个小项目, 我已经是该项目的Developer, 可是提交代码依然提示无权限 这是由于我是在master上直接提交的, 而GitLab默认是保护master分支的, push只对M ...
- git push时提示"fatal: The current branch master has no..."
git push到远程仓库时提示:fatal: The current branch master2 has no upstream branch. To push the current branc ...
- git push时提示--set-upstream
问题: 提示需要加--set-upstream
- git push提交报错,提示文件过大,且去掉大文件也报同样的错误
错误原因: 大文件存在没有被提交的commit记录里面: 解决方案: 删除有大文件的commit记录即可 移除大文件的正确姿势 $ git rm --cached giant_file(文件名) # ...
随机推荐
- Centos7下CPU内存等资源监控
1.查看内存使用情况: [root@takeout web-takeout]# free -m total used free shared buff/cache available Mem: 378 ...
- 维特比算法(Viterbi)-实例讲解(暴力破解+代码实现)
1.简介 维特比算法是一个通用的求序列最短路径的动态规划算法,也可以用于很多其他问题,比如:文本挖掘.分词原理.既然是动态规划算法,那么就需要找到合适的局部状态,以及局部状态的递推公式.在HMM中,维 ...
- OkHttp3实现Cookies管理及持久化
转发自:http://www.codeceo.com/article/okhttp3-cookies-manage.html OKHttp3正式版刚发布了没几天,正好重构之前的代码,于是第一时间入坑了 ...
- Python开发工具,服务器框架等
python服务器框架:uWSGI WEB服务器.mod_WS.Meinheld.Gunicorn.CherryPy.Bjoern 查看python内部模块命令,内置函数,查看python已经安装的模 ...
- 链式编程:遇到多个构造器参数(Constructor Parameters)时要考虑用构建器(Builder)
public class NutritionFacts { private final int servingSize; private final int servings; private fin ...
- java编程常用的快捷键
Eclipse 常用快捷键 Eclipse的编辑功能非常强大,掌握了Eclipse快捷键功能,能够大大提高开发效率.Eclipse中有如下一些和编辑相关的快捷键. 1. [ALT+/] 此快捷键为用户 ...
- haproxy 学习记录
1.简易安装 make TARGET=linux26 prefix=/usr/local/haproxy install 启动haproxy在sbin目录,其余的在doc目录 2. 配置 hdr_be ...
- nodeJs的npm报错问题
1. Failed at the phantomjs-prebuilt@2.1.14 install script 'node install.js'. 解决办法: npm install phant ...
- Sqlserver 备份
Transact-SQL 语法规则 Transact-SQL 引用中的语法关系图使用下列规则. 大写 : Transact-SQL 关键字. 斜体 : Transact-S ...
- [javaSE] 并发编程(线程间通信)
新建一个资源类Resource 定义成员变量String name 定义成员变量int age 新建一个输入类Input,实现Runnable接口 定义一个构造方法Input(),传入参数:Resou ...