Skip to content

Instantly share code, notes, and snippets.

View nico1988's full-sized avatar

nico1988 nico1988

View GitHub Profile
@nico1988
nico1988 / .block
Created March 7, 2020 15:26
SDC2020 - Vue Workshop
license: mit
@nico1988
nico1988 / .block
Created March 7, 2020 15:26
SDC2020 - Vue Workshop
license: mit
@nico1988
nico1988 / .block
Last active March 7, 2020 15:36
SDC2020 - Vue Workshop
license: mit
------------------------------commit------------------------------
$ git status # 检查文件当前的状态
$ git add [文件名] # 追踪新的文件
$ git diff --cached # 若要看已经暂存起来的文件和上次提交时的快照之间的差异
$ git commit -m "Story 182: Fix benchmark" # 用一行命令提交更新
$ git commit -a -m 'added new benchmarks' # 跳过add命令直接提交
$ git rm --cached log.log # 从git仓库中删除不小心追踪的文件(用于gitignore之前追踪的文件)
$ git mv file_from file_to # 移动文件/重命名文件
------------------------------branch------------------------------
@nico1988
nico1988 / js
Created May 13, 2017 06:07
node 复制文件
var fs = require("fs");
var path = require("path");
fs.readFile(path.join(__dirname, "1.js"), function(err, data) {
if (err) {
throw err
}
console.log(data.toString)
fs.writeFile(path.join(__dirname, "2.js"), data, function(err, data) {
if (err) {
throw err
@nico1988
nico1988 / js
Created May 13, 2017 06:07
node 复制文件
var fs = require("fs");
var path = require("path");
fs.readFile(path.join(__dirname, "1.js"), function(err, data) {
if (err) {
throw err
}
console.log(data.toString)
fs.writeFile(path.join(__dirname, "2.js"), data, function(err, data) {
if (err) {
throw err
transitionEnd