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. Optional变量初学者指南

    苹果三周前发布了Swift. 从那时起,我一直在阅读Swift的官方指南,并在Xcode 6测试版中使用. 我开始喜欢Swift的简单和语法. 与我的团队一起,我仍然在研究新的语言,并看看它与Obje ...

  2. Java swing: 实现ActionListener监听器的三种途径

    Swing是目前Java中不可缺少的窗口工具组,是用户建立图形化用户界面(GUI)程序的 强大工具.Java Swing组件自动产生各种事件来响应用户行为.如当用户点击按钮或选择菜单项目时,Swing ...

  3. 1-SDK开发初探-8266

    先分享一个比较感动的事情 其实做实物是因为好多人看了我的文章之后还是会遇到各种各样的问题,然后呢真是让亲们搞的自己好累.......所以就想着如果亲们用自己做的板子,出现什么问题能够快速的解决,,而且 ...

  4. 纯CSS写正方形自适应宽高,且左侧高与正方形高保持一致

    先上图 虽然写法有点暴力,但是效果还是可以的,哈哈哈哈哈html:<div class="box">            <div class="le ...

  5. JVM菜鸟进阶高手之路四

    转载请注明原创出处,谢谢! 由于很多的jvm分析最好是基于gc日志的,所以添加参数如下即可: -verbose:gc -XX:+HeapDumpOnOutOfMemoryError -XX:+Prin ...

  6. Spark任务流程笔记

    Spark学习笔记总结 02. Spark任务流程 1. RDD的依赖关系 RDD和它依赖的父RDD(s)的关系有两种不同的类型,即窄依赖(narrow dependency)和宽依赖(wide de ...

  7. adobe acrobat pro 9破解方法

    方法一:(经常没用,不推荐) 尝试一下部分常见序列号: 网上搜 方法二: (能找到文件的,推荐) 1.到 C:\Program Files\Common Files\Adobe\Adobe PCD\c ...

  8. 关于API,前后端分离

    之前再开放新型web项目和app时,遇到了和前后端交互的问题.总所周知的是,web前后端交接时,最重要的交互方式的接口的制定. 而关于接口的规定,衍生出了一大堆问题,第一是关于空值的制定,是不输出呢? ...

  9. 反射结合xml简单的模拟spring创建bean

    框架最底层其实就是通过反射实现的,就像spring,当你配置各种各样的bean时都是以配置文件的形式配置的,你需要用到哪些bean就配哪些,spring容器就会根据你的需求去动态加载,这儿写一个简单的 ...

  10. Quartz学习——Spring和Quartz集成详解(三)

    Spring是一个很优秀的框架,它无缝的集成了Quartz,简单方便的让企业级应用更好的使用Quartz进行任务的调度.下面就对Spring集成Quartz进行简单的介绍和示例讲解!和上一节 Quar ...