1. Git must be installed, Sublime plugin "Git" only connects Sublime with Git.

Download URL

https://git-scm.com/downloads

2. Enable Sublime 3 Package Control, which is a sublime package manage tool

Ctrl+Shift+P

Install Package Control

3. Install Package (Plugin) "Git"

Ctrl+Shift+P

Install Package -> Search "Git", then install

4. After installed, most of Git Cmd could be issued from follow operation

Ctrl+Shift+P

Type "Git: "

5. The common operations as below

1). Git: Init --> Initialize current directory as Git Directory

2). Git: Add All --> Add all changed files to staging area, Git: Add Current File --> To add current file into staging area.

3). Git: Commint --> Add staged files to commit area. It will promt another page to add commit message. This page will show all code hunks that will be part of this commit. Add a commit message and close the file to commit files.

4). Git: Push --> Push Changes to remote origin. will push your local committed changes to associated remote repository. This command will give error in sublime console if remote repository is not associated with local repo.

Open Git at Windows CMD, try to make a remote repo.

git remote add origin https://github.com/username/reponame.git

5). Git: Pull --> Pull changes from remote origin

After making remote repo, we can Push to Github and Pull from Github

Notes: When using git pull, there will be an error --> fatal: refusing to merge unrelated histories

Open Git at Windows CMD, try to pull from remote repo with a parameter

git pull origin master --allow-unrelated-histories

Then it's able to pull from sublime

6). Git: Diff All Files --> will show all changes in the code which are not committed. This will open up new window which is showing all the changes in the code hunks.

7). Git: Log All --> Will prompt to select the list of previous commit. Once you select specific commit, it will show log of all changes happend in that commit.

Ref:

1. http://smoothprogramming.com/sublime-text/how-to-use-git-in-sublime-text/

2. https://stackoverflow.com/questions/37937984/git-refusing-to-merge-unrelated-histories

Check log of changes in specific commit

Integrates Git with Sublime 3 to pull or push to Github by using Sublime plugin Git的更多相关文章

  1. git 使用https方式进行 pull、push代码免密

    由于网络原因我用ssh方法拉取代码每次都提示远程服务连接失败,因此我用了https方式去拉去代码. 这种方式拉取代码每次操作都要输入密码,为了解决这个问题做了一下操作: 在命令行输入 git conf ...

  2. Go丨语言package github.com/Go-SQL-Driver/MySQL: exec: "git": executable file not found in %PATH%解决方法

    Go语言在添加第三方MySQL驱动的时候报错: go: missing Git command. See https://golang.org/s/gogetcmd package github.co ...

  3. 如何使用Git建立本地仓库并上传代码到GitHub

    使用Git建立本地仓库并上传代码到GitHub 工具/原料   电脑安装git客户端.注册github账号并登陆 方法/步骤     到本地项目文件夹右键选择git bash here   输入个人信 ...

  4. git与github安装、配置、pull、push

    操作系统是Ubuntu 16.04 LTS 64bit 1 安装git (1)安装 sudo apt-get install git-core (2)一些全局变量的初始化 在本地建立一个文件夹,然后做 ...

  5. Git 远程分支的pull与push

    Git 远程分支的pull与push 远程分支信息查看 git branch -r #查看远程分支 git branch -a #查看所有分支,本地和远程 git remote show [remot ...

  6. 好代码是管出来的——Git的分支工作流与Pull Request

    上一篇文章介绍了常用的版本控制工具以及git的基本用法,从基本用法来看git与其它的版本控制工具好像区别不大,都是对代码新增.提交进行管理,可以查看提交历史.代码差异等功能.但实际上git有一个重量级 ...

  7. 【学习总结】Git学习-本地仓库覆盖式更新对于Git仓库的影响以及pull/push到GitHub

    < 许久不用Git之后的探索 > 准备日常更新自己的GitHub了.但是编写的文件平时不放在Git仓库路径下. 故测试覆盖式更新对于仓库是否有影响 直接说结论: 通过对已有库的测试发现覆盖 ...

  8. git配置正确且权限已开但是pull或push提示无权限

    因为之前提示输入用户名和密码时输入错误,之后就一直权限认证失败.这种情况下在git bash中输入: git config --system --unset credential.helper 就会重 ...

  9. git pull和push冲突

    http://blog.csdn.net/matrix_laboratory/article/details/18034509 问题描述 1 有人改动了 文件A.java,提交到git 2 我没有pu ...

随机推荐

  1. 201521123117 《Java程序设计》第13周学习总结

    1. 本周学习总结 2. 书面作业 1. 网络基础 1.1 比较ping www.baidu.com与ping cec.jmu.edu.cn,分析返回结果有何不同?为什么会有这样的不同? 分析结果:从 ...

  2. Markdown格式

    一个例子: 例子开始 1. 本章学习总结 今天主要学习了三个知识点 封装 继承 多态 2. 书面作业 Q1. java HelloWorld命令中,HelloWorld这个参数是什么含义? 今天学了一 ...

  3. Core Java 简单谈谈HashSet

    同学们在看这个问题的时候,我先提出者两个问题,然后大家带着问题看这个文章会理解的更好. HashSet为什么添加元素时不能添加重复元素? HashSet是否添加null元素? 打开源码, 我们看到如下 ...

  4. 纳税服务系统【信息发布管理、Ueditor、异步信息交互】

    需求分析 我们现在来到了纳税服务系统的信息发布管理模块,首先我们跟着原型图来进行需求分析把: 一些普通的CRUD,值得一做的就是状态之间的切换了.停用和发布切换. 值得注意的是:在信息内容中,它可以带 ...

  5. Hibernate第八篇【懒加载】

    前言 前面在使用Hibernate的时候就提及过了懒加载,但没有好好地说明具体的说明究竟是怎么回事-本博文主要讲解懒加载 什么是拦截器以及为什么要使用懒加载? 懒加载就是当使用数据的时候才去获取数据. ...

  6. SQL基础巩固

    1.一定要记住,SQL 对大小写不敏感! 2.分号是在数据库系统中分隔每条 SQL 语句的标准方法,这样就可以在对服务器的相同请求中执行一条以上的语句. 如果您使用的是 MS Access 和 SQL ...

  7. Mysql中的like模糊查询

    MySql的like语句中的通配符:百分号.下划线和escape %代表任意多个字符 _代表一个字符 escape,转义字符后面的%或_,使其不作为通配符,而是普通字符匹配   数据库数据如下: 1. ...

  8. 图文详解在Windows server 2008 R2上安装SQL Server 2012集群

    1.准备: 4台服务器(1台AD.2台SQL服务器.1台iSCSI存储服务器) 9个IP(1个AD的IP.2个SQL服务器的IP.2个心跳IP.1个iSCSI存储服务器的IP.1个集群IP.1个DTC ...

  9. oracle11g 体系结构详解

    1.oracle内存由SGA+PGA所构成 2.oracle数据库体系结构数据库的体系结构是指数据库的组成.工作过程与原理,以及数据在数据库中的组织与管理机制. oracle工作原理: 1).在数据库 ...

  10. python和C语言混编的几种方式

    Python这些年风头一直很盛,占据了很多领域的位置,Web.大数据.人工智能.运维均有它的身影,甚至图形界面做的也很顺,乃至full-stack这个词语刚出来的时候,似乎就是为了描述它. Pytho ...