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 ...
随机推荐
- java课程设计——算术运算测试个人博客
1.团队课程设计链接 团队博客:http://www.cnblogs.com/yytx/p/7064790.html 2.个人负责模块 有关排行榜的界面设计和代码编写 3.自己的代码提交记录截图 4. ...
- 使用electron将应用程序加入到系统托盘
博主电脑
- Hyperledger Fabric 1.0 从零开始(四)——Fabric源码及镜像文件处理
2:Fabric源码及镜像文件处理 2.1下载Fabric源码 下载Fabric源码是因为要用到源码中提到的列子和工具,工具编译需要用到go语言环境,因此需要把源码目录放到$GOPATH下.通过1.3 ...
- python 浅析模块
今天买了一本关于模块的书,说实话,模块真的太多了,小编许多也不知道,要是把模块全讲完,可能得出本书了,所以小编在自己有限的能力范围内在这里浅析一下自己的见解,同时讲讲几个常用的模块. 首先说一下对模块 ...
- webservice03#schema#元素属性定义
工具软件XMLSpy 2010 破解版,是非常好的写XMl的工具软件. 1,Schema的好处: Schema出现的目的是通过一个更加合理的方式来编写xml的限制文件(基于xml语法的方式): Sch ...
- springboot+swagger2
springboot+swagger2 小序 新公司的第二个项目,是一个配置管理终端机(比如:自动售卖机,银行取款机)的web项目,之前写过一个分模块的springboot框架,就在那个框架基础上进行 ...
- 业余草通告CSDN博客用户zhang__ao非法转载文章的公告
今天早上有粉丝给我反馈,CSDN的一位用户大量非法的转载了我的个人网站:业余草(www.xttblog.com)上的大量文章.现一对该用户转载业余草上网站上的所有文章进行了举报! 从上图中可以看出,该 ...
- SSH端口转发详解及实例
一.SSH端口转发简介 SSH会自动加密和解密所有SSH客户端与服务端之间的网络数据.但是,SSH还能够将其他TCP端口的网络数据通SSH链接来转发,并且自动提供了相应的加密及解密服务.这一过程也被叫 ...
- 张高兴的 Windows 10 IoT 开发笔记:使用 Lightning 中的软件 PWM 驱动 RGB LED
感觉又帮 Windows 10 IoT 开荒了,所以呢,正儿八经的写篇博客吧.其实大概半年前就想写的,那时候想做个基于 Windows 10 IoT 的小车,但树莓派原生不支持 PWM 啊.百度也搜不 ...
- 前端基础之初识 HTML
HTML HTML(Hypertext Markup Language)即超文本标记语言,是WWW的描述语言.设计HTML语言的目的是为了能把存放在一台电脑中的文本或图形与另一台电脑中的文本或图形方便 ...