使用 VisualCode + iTerm2 提交github的Pull Request
2016-12-31 16:17
537 查看
VisualCode集成github功能,是程序猿参与开源项目的利器。相比Sublime简单了很多(插件安装繁琐,比如你试试在Sublime2 安装gosublime,这里有坑; Sublime 3修复了Package Control的Bug)。总之,有大牛Erich Gramma负责的项目值得信赖,主要差别是生产效率。
对VisualCode还不是特别熟悉,今天使用一种混合模式进行github开源项目开发-即使用iTerm2终端clone项目,在VisualCode进行编辑和提交,在github网站生成Pull Request。步骤如下:
1)git clone https://github.com/beepone/bootstrap.git
2)cd bootstrap
3)在VisualCode打开上述目录,编辑某个文件
4)点击左侧github图标,VC自动发现change,然后输入message,按下Command+Enter
5)在iTerm2终端里面,在当前目录,输入git push ,注意在此之前最好设置全局用户名和邮箱,以免出现Unrecognized author警告。
git config --global user.name "yourname in github"
git config --global user.email yourname@company.com
6)提交成功,你应该能看到以下信息
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 281 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/beepony/bootstrap.git 8f0dd8a..2f783ca master -> master
如果想rollback刚才的commit,输入以下两个命令
git reset --hard HEAD^
git push origin HEAD --force
输出:
Total 0 (delta 0), resued 0 (delta 0)
To https://github.com/beepony/bootstrap.git
+ f4cc153...8f0dd8a HEAD -> master (forced update)
最后,在github项目里,找到commit,单击进入一个页面,可以创建Pull Request。
对VisualCode还不是特别熟悉,今天使用一种混合模式进行github开源项目开发-即使用iTerm2终端clone项目,在VisualCode进行编辑和提交,在github网站生成Pull Request。步骤如下:
1)git clone https://github.com/beepone/bootstrap.git
2)cd bootstrap
3)在VisualCode打开上述目录,编辑某个文件
4)点击左侧github图标,VC自动发现change,然后输入message,按下Command+Enter
5)在iTerm2终端里面,在当前目录,输入git push ,注意在此之前最好设置全局用户名和邮箱,以免出现Unrecognized author警告。
git config --global user.name "yourname in github"
git config --global user.email yourname@company.com
6)提交成功,你应该能看到以下信息
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 281 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/beepony/bootstrap.git 8f0dd8a..2f783ca master -> master
如果想rollback刚才的commit,输入以下两个命令
git reset --hard HEAD^
git push origin HEAD --force
输出:
Total 0 (delta 0), resued 0 (delta 0)
To https://github.com/beepony/bootstrap.git
+ f4cc153...8f0dd8a HEAD -> master (forced update)
最后,在github项目里,找到commit,单击进入一个页面,可以创建Pull Request。
相关文章推荐
- Vue.js的bind报错解决
- C# EasyUI树形结构权限管理模块
- UITableView 数组越位
- vue(2)
- winform简单的UI和数据异步加载
- [APUE]标准IO库(下)
- Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding cont
- SAPUI5 (07) - MVC 文件的名称和位置
- 魅族适配menuitem没显示
- Qt Quick QML Text
- String和StringBuilder类方法和用法
- iOS UITableView 的单元格行格式不一要怎么做才好些?
- ubuntu16.04 禁用Guest用户
- 打包工具apkbuilder.jar
- 超简单玩转 GitHub 的问题单(issue)
- 新人安卓UI布部问题,无思路,求帮忙
- uitableviewcell怎么取字典里面嵌套字典的key??
- Leetcode First Unique Character in a String
- JSP内置对象之request对象使用案例
- knockout + require + director 构建单页面程序(integration)