Integrates Git with Sublime 3 to pull or push to Github by using Sublime plugin Git
1. Git must be installed, Sublime plugin "Git" only connects Sublime with Git.
Download URL
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的更多相关文章
- git 使用https方式进行 pull、push代码免密
由于网络原因我用ssh方法拉取代码每次都提示远程服务连接失败,因此我用了https方式去拉去代码. 这种方式拉取代码每次操作都要输入密码,为了解决这个问题做了一下操作: 在命令行输入 git conf ...
- 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 ...
- 如何使用Git建立本地仓库并上传代码到GitHub
使用Git建立本地仓库并上传代码到GitHub 工具/原料 电脑安装git客户端.注册github账号并登陆 方法/步骤 到本地项目文件夹右键选择git bash here 输入个人信 ...
- git与github安装、配置、pull、push
操作系统是Ubuntu 16.04 LTS 64bit 1 安装git (1)安装 sudo apt-get install git-core (2)一些全局变量的初始化 在本地建立一个文件夹,然后做 ...
- Git 远程分支的pull与push
Git 远程分支的pull与push 远程分支信息查看 git branch -r #查看远程分支 git branch -a #查看所有分支,本地和远程 git remote show [remot ...
- 好代码是管出来的——Git的分支工作流与Pull Request
上一篇文章介绍了常用的版本控制工具以及git的基本用法,从基本用法来看git与其它的版本控制工具好像区别不大,都是对代码新增.提交进行管理,可以查看提交历史.代码差异等功能.但实际上git有一个重量级 ...
- 【学习总结】Git学习-本地仓库覆盖式更新对于Git仓库的影响以及pull/push到GitHub
< 许久不用Git之后的探索 > 准备日常更新自己的GitHub了.但是编写的文件平时不放在Git仓库路径下. 故测试覆盖式更新对于仓库是否有影响 直接说结论: 通过对已有库的测试发现覆盖 ...
- git配置正确且权限已开但是pull或push提示无权限
因为之前提示输入用户名和密码时输入错误,之后就一直权限认证失败.这种情况下在git bash中输入: git config --system --unset credential.helper 就会重 ...
- git pull和push冲突
http://blog.csdn.net/matrix_laboratory/article/details/18034509 问题描述 1 有人改动了 文件A.java,提交到git 2 我没有pu ...
随机推荐
- Hyperledger Fabric 1.0 从零开始(四)——Fabric源码及镜像文件处理
2:Fabric源码及镜像文件处理 2.1下载Fabric源码 下载Fabric源码是因为要用到源码中提到的列子和工具,工具编译需要用到go语言环境,因此需要把源码目录放到$GOPATH下.通过1.3 ...
- 鸟哥Linux学习笔记07
1, vi 是 老式的文字处理器,不过功能已经很齐全了,但是还是有可以进步的地方. vim可以说是程序开发者的一项很好用的工具,vim官网(http://www.vim.org)自己也说vim是一个“ ...
- JPA关系映射之one-to-one
一对一关联有两种实现方式:一种是共享的主键关联,另一种是一对一的外键关联 1.共享的主键关联:让两个对象具有共同的主键值,以表明他们之间的一一对应关系. Person.java类 public cla ...
- CacheConcurrencyStrategy五种缓存方式
CacheConcurrencyStrategy有五种缓存方式: CacheConcurrencyStrategy.NONE,不适用,默认 CacheConcurrencyStrategy.REA ...
- java web项目修改favicon.ico图标的方式
1.修改整个项目的tomcat图标 找到tomcat的根目录(tomcat-webapps-ROOT目录),然后将修改的favicon.ico图标覆盖掉本地的图标,然后再重启项目,刷新,清除浏览器缓存 ...
- ui-router
学习历程:1 ng-router --> 2 location --> 3 $location --> 4 promise --> 5 html5 history -- ...
- 【京东账户】——Mysql/PHP/Ajax爬坑之添加购物车
一.引言 做京东账户项目中的购物车模块,功能之一就是添加购物车.要用到的是Apach环境,Mysql.PHP以及Ajax. 预计效果:用户点击->"加入购物车" 添加成功 ...
- java 反射 类装载器
前言: java语言允许通过程序化的方式间接对Class进行操作,Class文件由类装载器装载后,在jvm中将形成一份描述Class结构的元信息对象,通过该元信息对象可以获知Class的结构信息,如构 ...
- JAVA多线程---ThreadLocal<E>
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px ".SF NS Text" } tips: 1 当前ThreadLocal ...
- ThinkPHP中:使用递归写node_merge()函数
需求描述: 现有一个节点集合 可以视为一个二维数组 array(5) { [0] => array(4) { ["id"] => string(1) "1&q ...