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. 201521123048 《Java程序设计》第9周学习总结

    1. 本周学习总结 2. 书面作业 本次PTA作业题集异常 常用异常 题目5-1 1.1 截图你的提交结果(出现学号) 1.2 自己以前编写的代码中经常出现什么异常.需要捕获吗(为什么)?应如何避免? ...

  2. 201521123068 《java程序设计》 第11周学习总结

    1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结多线程相关内容. 多线程的冲突:同时运行的线程需要访问共享数据(临界资源) 多线程的互斥访问:两个或两个以上的线程需要同时对同一数据 ...

  3. PHOTOSHOP常用快捷键大全

    PHOTOSHOP常用快捷键大全一.文件新建 CTRL+N打开 CTRL+O 打开为 ALT+CTRL+O关闭 CTRL+W保存 CTRL+S 另存为 CTRL+SHIFT+S另存为网页格式 CTRL ...

  4. Day-16: 图形界面

    Python支持多种图形界面,有:第三方库有Tk.wxWidgets.Qt.GTK等. Python自带的库是支持Tk的Tkinter,无需安装任何安装包,就可以直接使用. 在Python中使用函数调 ...

  5. Go语言基础知识

    Go语言的一般结构:basic_structure.go Go程序是通过package来组织的,只能同过package名称为main的包可以包含main函数(一个可执行程序只能有一个main包) 通过 ...

  6. 记录兼容IE8中发现的一些问题

    1.new Date().getYear(); chrome下:获取的是1900年之后的年份,如2017年获取的是117 IE8下:获取的是公元年份,如2017获取的是2017 解决方案:使用new ...

  7. 使用Gateway-Worker实现多人分组实时聊天 结合第三方tp

    一.基础知识1.Workerman是一款纯PHP开发的开源高性能的PHP socket 服务器框架.被广泛的用于手机app.移动通讯等领域的开发. 支持TCP长连接,支持Websocket.HTTP等 ...

  8. 如何快速成长?我的java之路!

    由于一些外部的原因,我不得不从自己熟悉的php领域,转战到java战场.我个人觉得还是有些心得吧,不管怎么样,或多或少可能都会有那么些经历的人,和你一起走在这世上!尽管你不知道TA是谁. 其实,转换一 ...

  9. 微服务~Eureka实现的服务注册与发现及服务之间的调用

    微服务里一个重要的概念就是服务注册与发现技术,当你有一个新的服务运行后,我们的服务中心可以感知你,然后把加添加到服务列表里,然后当你死掉后,会从服务中心把你移除,而你作为一个服务,对其它服务公开的只是 ...

  10. Tree(uva 536)

    先声明,我还在学习中,这个题大部分代码借鉴的大佬的,其实这算是比较经典二叉树题了,关键在于递归建树. 代码附上: #include <iostream> #include <cstr ...