Jerry 修改了他的最后一次提交的修改操作,他已经准备好将更改。推操作的数据永久存储的 Git 仓库。推操作成功后,其他开发人员可以看到Jerry 的变化。

他执行的git日志命令来查看提交的细节。

[jerry@CentOS project]$ git log

上面的命令会产生以下结果。

commit d1e19d316224cddc437e3ed34ec3c931ad803958 Author: Jerry Mouse <jerry@yiibai.com> Date: Wed Sep 11 08:05:26 2013 +0530 Changed return type of my_strlen to size_t

push操作之前,他要审查他的变化,所以使用git show命令来查看他的变化。

[jerry@CentOS project]$ git show d1e19d316224cddc437e3ed34ec3c931ad803958

上面的命令会产生以下结果。

commit d1e19d316224cddc437e3ed34ec3c931ad803958 Author: Jerry Mouse <jerry@yiibai.com> Date: Wed Sep 11 08:05:26 2013 +0530 Changed return type of my_strlen to size_t diff –git a/string.c b/string.c new file mode 100644 index 0000000..7da2992 — /dev/null +++ b/string.c @@ -0,0 +1,24 @@ +#include <stdio.h> + +size_t my_strlen(char *s) +{ + char *p = s; + + while (*p) + ++p; + return (p -s ); +} + +int main(void) +{ + int i; + char *s[] = { + “Git tutorials”, + “Tutorials Point” + }; + + + for (i = 0; i < 2; ++i) printf(“string lenght of %s = %lu/n”, s[i], my_strlen(s[i])); + + return 0; +}

Jerry 为他的变化感到高兴,他是准备推他的变化。

[jerry@CentOS project]$ git push origin master

上面的命令会产生以下结果。

Counting objects: 4, done. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 517 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To gituser@git.server.com:project.git 19ae206..d1e19d3 master −> master

Jerry 的变化成功地推到版本库,现在其他开发人员可以查看他的变化进行克隆或更新操作。

PS:如果您想和业内技术大牛交流的话,请加qq群(521249302)或者关注微信公众 号(AskHarries),谢谢!

Git 推送操作的更多相关文章

  1. linux git 推送空文件夹

    /********************************************************************************* * linux git 推送空文件 ...

  2. 使用git推送代码到开源中国以及IDEA环境下使用git

    使用git推送代码到开源中国以及IDEA环境下使用git 在学习Java的过程中我们会使用到git这个工具来将我们本周所编写的代码上传到开源中国进行代码托管,而在使用git的时候有很多的同学由于不会操 ...

  3. git推送代码报错:fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream

    情景再现 远程新建仓库,然后本地 git bash执行以下代码 git init git add . git commit -m 'xxx' git remote add origin https:/ ...

  4. git推送本地分支到远端 以及删除远端分支的 命令

    git推送本地分支到远端 当前处于master分支,尝试用了git push origin warning: push.default is unset; its implicit value is ...

  5. git 推送出现 "fatal: The remote end hung up unexpectedly" 解决方案

    本文转载于:https://blog.csdn.net/zcmain/article/details/76855595 https://blog.csdn.net/u012973744/article ...

  6. git推送tag到远端服务器

    git推送tag到远端服务器 默认情况下,git push并不会把tag标签传送到远端服务器上,只有通过显式命令才能分享标签到远端仓库.1.push单个tag,命令格式为:git push origi ...

  7. Git推送到多个远程仓库

    Git推送到多个远程仓库 Grey 原文地址 准备工作 在码云和Github上分别新建两个不包括任何文件的空仓库(若是两个已经有文件的仓库,请参见关联已经存在的项目) https://github.c ...

  8. git 推送本地项目到远程库

    git 推送本地项目到远程库 1@DESKTOP-3H9092J MINGW64 /e/mozq/00store/01/SmartCard_MS $ git init Initialized empt ...

  9. git推送代码问题之:ERROR: [abcdefg] missing Change-Id in commit message footer

    一.问题: 在日常的工作中,使用git推送代码时会出现以下报错,“missing Change-Id in commit message” : qinjiaxi:$ git push origin H ...

随机推荐

  1. POJ.1655 Balancing Act POJ.3107 Godfather(树的重心)

    关于树的重心:百度百科 有关博客:http://blog.csdn.net/acdreamers/article/details/16905653 1.Balancing Act To POJ.165 ...

  2. Sql Server 修改表所属用户

    Sql Server 修改表所属用户 exec sp_changeobjectowner 'tablename','dbo' tablename--所要修改的表明 dbo--是表所属的用户,默认是db ...

  3. java中动态给sql追加?号

    /* * 用来生成where子句 len数组的长度 */ private String toWhereSql(int len) { StringBuilder sb = new StringBuild ...

  4. PHP抓取网页内容经验总结

    用php 抓取页面的内容在实际的开发当中是非常有用的,如作一个简单的内容采集器,提取网页中的部分内容等等,抓取到的内容在通过正则表达式做一下过滤就得到了你想要的内容,至于如何用正则表达式过滤,在这里就 ...

  5. linux常用服务程序一键安装

    PHP7安装 rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm service php-fpm stop yum remove php5* ...

  6. apache hive 1.0.0发布

    直接从0.14升级到1.0.0,主要变化有: 去掉hiveserver 1 定义公共的API,比如HiveMetaStoreClient 当然,也需要使用新的beeline cli客户端. 不过最值得 ...

  7. Android笔记(四):RecyclerView

    RecyclerView是ListView的增强版.有了它之后,你就可以抛弃ListView了. recycle,重复利用.在ListView里,我们得自己写重复利用View的代码,而Recycler ...

  8. UML类图的几个名词及对应符号

    实现(Implements) 实现的符号为:\(--- \triangleright\) 箭头指向接口. 泛化/继承(Inheritance) 继承的符号为:$ -\triangleright $ 箭 ...

  9. Chrome RenderText分析(1)

      先从一些基础的类开始 1.Range // A Range contains two integer values that represent a numeric range, like the ...

  10. web架构延变

    在现代的软件系统中,几乎所有的系统都使用到了数据库,不论是关系型数据,例如MySql.SQLite.Oracle.SQLServer等,还是非关系性数据,例如mongoDB.redis等.本文已web ...