Visual Studio Code 与 Github 集成
使用Visual Studio Code进行Nodejs开发充满了便利,为了更好的进行开发工作,有必要使用Github进行代码管理。
Visual Studio Code已经集成了GIT组件:
https://github.com/git-for-windows/git/releases/download/v2.8.1.windows.1/Git-2.8.1-64-bit.exe
下载并安装好,后开始配置GITHUB
1.设置全局Git用户名
$ git config --global user.name mengkzhaoyun
$ git config --global user.email mengkzhaoyun@gmail.com
2.映射到本地目录
$ cd D:\Libraries\Documents\Visual Studio Code
$ git clone https://github.com/Mengkzhaoyun/HZW.git
Cloning into 'HZW'...
remote: Counting objects: 1690, done.
remote: Compressing objects: 100% (1441/1441), done.
remote: Total 1690 (delta 212), reused 1675 (delta 200), pack-reused 0
Receiving objects: 100% (1690/1690), 6.74 MiB | 58.00 KiB/s, done.
Resolving deltas: 100% (212/212), done.
Checking connectivity... done.
Checking out files: 100% (1643/1643), done.
3.检查是否设置好了
$ git remote -v
origin https://github.com/Mengkzhaoyun/HZW.git (fetch)
origin https://github.com/Mengkzhaoyun/HZW.git (push)
如果不存在以上信息可以打开项目目录重新映射
$ cd D:\Libraries\Documents\Visual Studio Code\HZW
$ git init
$ git remote add origin https://github.com/Mengkzhaoyun/HZW.git
4.修改代码,Commit , Push
Commit提交变更到本地,
Push才是提交更新至github服务器
5.换机器(家、单位),Sync或Pull
左下角的状态栏有提示的,很方便

6.有些目录需要排除,不提交到Github
如node_modules,.settings,.vscode
参考Large-Moon的博客:github过滤文件提交
a.在工程根目录下建立.gitignore文件
将要排除的文件或目录 写到.gitignore这个文件中
排除以.apk结尾的文件 : *.apk
排除目录node_modules : node_modules/
*.apk
.settings/
.vscode/
node_modules/

b.在全局建立.gitignore文件,影响所有GIT项目
将.gitignore文件放到D:\Libraries\Documents\Visual Studio Code文件夹中
打开C:\Users\Mengk\.gitconfig文件,如下修改
[user]
name = mengkzhaoyun
email = mengkzhaoyun@gmail.com
[gui]
recentrepo = D:/Libraries/Documents/Visual Studio Code/HZW
[core]
excludesfile = D:/Libraries/Documents/Visual Studio Code/.gitignore

Visual Studio Code 与 Github 集成的更多相关文章
- Visual Studio Code配置GitHub(Win7环境)
一.软件环境说明(演示环境) 1.操作系统:Windows7旗舰版(64bit) 2.Visual Studio Code版本:1.32.3 3.Git版本:2.21.0.windows.1 二.软件 ...
- visual studio code 的必装推荐插件plugin, vscode, vsc
An Old Hope Theme (theme, 推荐,且推荐它的 classic theme,安装后在颜色选项里选择,该插件的定制见文末) Cobalt2 (theme) Drac ...
- 在Visual Studio Code中配置GO开发环境
一.GO语言安装 详情查看:GO语言下载.安装.配置 二.GoLang插件介绍 对于Visual Studio Code开发工具,有一款优秀的GoLang插件,它的主页为:https://github ...
- docker4dotnet #3 在macOS上使用Visual Studio Code和Docker开发asp.net core和mysql应用
.net猿遇到了小鲸鱼,觉得越来越兴奋.本来.net猿只是在透过家里那田子窗看外面的世界,但是看着海峡对岸的苹果园越来越茂盛,实在不想再去做一只宅猿了.于是,.net猿决定搭上小鲸鱼的渡轮到苹果园去看 ...
- Visual Studio Code 配置指南
Visual Studio Code (简称 VS Code)是由微软研发的一款免费.开源的跨平台文本(代码)编辑器.在我看来它是「一款完美的编辑器」. 本文是有关 VS Code 的特性介绍与配置指 ...
- Visual Studio Code,完美的编辑器
今日凌晨,微软的文本(代码)编辑器 Visual Studio Code(简称 VS Code),发布了首个正式版,距离首个 beta 版上线时间刚好一年. 在十多年的编程经历中,我使用过非常多的的代 ...
- Visual Studio Code 使用Git进行版本控制
Visual Studio Code 使用Git进行版本控制 本来认为此类教程,肯定是满网飞了.今天首次使用VS Code的Git功能,翻遍了 所有中文教程,竟没有一个靠谱的.遂动笔写一篇. 请确保你 ...
- 剖析并利用Visual Studio Code在Mac上编译、调试c#程序
0x00 前言 一周多以前的微软的Build大会上,微软发布了一个让很多人眼前一亮的工具,也是本文的主角——Visual Studio Code.很多使用Windows的朋友都很高兴,认为又多了一个很 ...
- ASP.NET Core 中文文档 第二章 指南(1)用 Visual Studio Code 在 macOS 上创建首个 ASP.NET Core 应用程序
原文:Your First ASP.NET Core Application on a Mac Using Visual Studio Code 作者:Daniel Roth.Steve Smith ...
随机推荐
- Java EE 7 / JAX-RS 2.0: Simple REST API Authentication & Authorization with Custom HTTP Header--reference
REST has made a lot of conveniences when it comes to implementing web services with the already avai ...
- html02表格的使用
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- PHP解析xml
<?xml version="1.0" encoding="UTF-8"?> <ZIP_result> <result name= ...
- B/S系统间跨域单点登录设计思路
基于B/S系统间单点登录 此处说的单点登录的概念,即不同系统公用一个登录界面.一处系统通过登录验证,在接入的各系统均为登录状态.一般有两种情景: 1) 一级域名相同 例如:tieba.baidu.c ...
- RESTful Web Services简单介绍
近几年,RESTful Web Services渐渐开始流行,大量用于解决异构系统间的通信问题.很多网站和应用提供的API,都是基于RESTful风格的Web Services,比较著名的包括Twit ...
- Android之使用json进行网络数据交换
JSON作为一种轻量级的数据交换格式,凭借其易于阅读和编写.易于解析.传输速度快等优点流行了起来.最近正好在学习Android端从服务端端取数据,Json便派上了用场.好,下面开始切入主题. 1.准备 ...
- sql问题
表中某个指标重复,去掉重复项: select * from #temp where A0107 in (select A0107 from #temp group by A0107having CO ...
- cmakelists 语法学习
1.项目最外层cmake编写:----------用于kdevelop编译器 project(filtering) cmake_minimum_required(VERSION 2.8) ————必须 ...
- 纯蓝ICON_学习教程
- Linux makefile 教程 非常详细,且易懂(转)
转自:http://blog.chinaunix.net/uid-27717694-id-3696246.html 原文地址:Linux makefile 教程 非常详细,且易懂 作者:Deem_pa ...