使用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 集成的更多相关文章

  1. Visual Studio Code配置GitHub(Win7环境)

    一.软件环境说明(演示环境) 1.操作系统:Windows7旗舰版(64bit) 2.Visual Studio Code版本:1.32.3 3.Git版本:2.21.0.windows.1 二.软件 ...

  2. visual studio code 的必装推荐插件plugin, vscode, vsc

    An Old Hope Theme     (theme, 推荐,且推荐它的 classic theme,安装后在颜色选项里选择,该插件的定制见文末) Cobalt2     (theme) Drac ...

  3. 在Visual Studio Code中配置GO开发环境

    一.GO语言安装 详情查看:GO语言下载.安装.配置 二.GoLang插件介绍 对于Visual Studio Code开发工具,有一款优秀的GoLang插件,它的主页为:https://github ...

  4. docker4dotnet #3 在macOS上使用Visual Studio Code和Docker开发asp.net core和mysql应用

    .net猿遇到了小鲸鱼,觉得越来越兴奋.本来.net猿只是在透过家里那田子窗看外面的世界,但是看着海峡对岸的苹果园越来越茂盛,实在不想再去做一只宅猿了.于是,.net猿决定搭上小鲸鱼的渡轮到苹果园去看 ...

  5. Visual Studio Code 配置指南

    Visual Studio Code (简称 VS Code)是由微软研发的一款免费.开源的跨平台文本(代码)编辑器.在我看来它是「一款完美的编辑器」. 本文是有关 VS Code 的特性介绍与配置指 ...

  6. Visual Studio Code,完美的编辑器

    今日凌晨,微软的文本(代码)编辑器 Visual Studio Code(简称 VS Code),发布了首个正式版,距离首个 beta 版上线时间刚好一年. 在十多年的编程经历中,我使用过非常多的的代 ...

  7. Visual Studio Code 使用Git进行版本控制

    Visual Studio Code 使用Git进行版本控制 本来认为此类教程,肯定是满网飞了.今天首次使用VS Code的Git功能,翻遍了 所有中文教程,竟没有一个靠谱的.遂动笔写一篇. 请确保你 ...

  8. 剖析并利用Visual Studio Code在Mac上编译、调试c#程序

    0x00 前言 一周多以前的微软的Build大会上,微软发布了一个让很多人眼前一亮的工具,也是本文的主角——Visual Studio Code.很多使用Windows的朋友都很高兴,认为又多了一个很 ...

  9. 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 ...

随机推荐

  1. PHPExcel讀取excel數據

    require_once 'PHPExcel.php'; $PHPReader = new PHPExcel_Reader_Excel2007(); $filePath = 'wjyl.xlsx'; ...

  2. iOS 短信验证码倒计时按钮的实现

    验证码倒计时按钮的应用是非常普遍的,本文介绍了IOS实现验证码倒计时功能,点击获取验证码,进入时间倒计时,感兴趣的小伙伴们可以参考一下: 实现思路: 创建按钮,添加点击方法: 用NSTimer定时器, ...

  3. Getting Started with the NDK

    The Native Development Kit (NDK) is a set of tools that allow you to leverage C and C++ code in your ...

  4. Oracle数据库用户数据完整备份与恢复

    使用PLSQL-Developer工具可以快速便捷地完成Oracle数据库用户.表的备份恢复. Oracle数据库用户数据完整备份与恢复 1. 备份 1.1   PL/SQL->工具->导 ...

  5. Python之路,Day8 - Socket编程进阶

    Python之路,Day8 - Socket编程进阶   本节内容: Socket语法及相关 SocketServer实现多并发 Socket语法及相关 socket概念 socket本质上就是在2台 ...

  6. Day3 - Python基础3 函数、递归、内置函数

    Python之路,Day3 - Python基础3   本节内容 1. 函数基本语法及特性 2. 参数与局部变量 3. 返回值 嵌套函数 4.递归 5.匿名函数 6.函数式编程介绍 7.高阶函数 8. ...

  7. bootstrap新闻模块样式模板

    <!-- news beginning --> <div class="container mp30"> <div class="row&q ...

  8. AutoLayout(转)

    转自    http://blog.sina.com.cn/s/blog_9564cb6e0101wv9o.html controller和View的责任分配: 1.View指定固有的content  ...

  9. PLSQL Package dubug方法

    初步接触EBS代码修改,花了几个小时搞明白了Package的debug方法, 1.打开需要测试的package,找到需要测试的过程,右键选择测试 2.在测试窗口中初始化过程的入参,点击测试按钮开始调试 ...

  10. 【NOI2006】最大获利

    [问题描述] 新的技术正冲击着手机通讯市场,对于各大运营商来说,这既是机遇,更是挑战.THU 集团旗下的CS&T 通讯公司在新一代通讯技术血战的前夜,需要做太多的准备工作,仅就站址选择一项,就 ...