笔记 2017

将项目中的dist目录提交到 gh-pagesw分支

git subtree push --prefix=dist origin gh-pages

在JavaScript构造函数中:如果return值类型,那么对构造函数没有影响,实例化对象返回空对象;如果return引用类型(数组,函数,对象),那么实例化对象就会返回该引用类型;

Atom中 JS支持 emmet 设置 keymap中增加

'atom-text-editor[data-grammar="source js jsx"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'

删除远程分支需要用:git push origin :branch_name 

更新fork的代码

1.打开你的github fork repo;

2.点击Pull request;

3.点击new pull request.默认情况下,github会比较original/your fork,这时应该不会有任何输出,因为你并没有做过任何变更;

4.点击switching the base.这时github将反过来比较yourfork/original,这时你将看到original相对你fork时的所有commit;

5.点击create a pull request for this comparison,这时将会反过来向你的repo提交一个pull request;

6.这时你作为你自己fork的repo的owner,你就可以点击confirm the merge,大笔一挥,所有的改动都被你一网打尽了@!

enjoy it!

附上比较费劲的另外一种更新办法:

git remote add upstream <pathtooriginalrepo>

git fetch upstream

git merge upstream/master master

git push origin master

原文地址:https://www.cnblogs.com/henshui/p/7423888.html