How to Use Git and GitHub
2016-05-31 15:01
357 查看
Lesson1
Finding Diffs Between Larger Files
这个课程让我学会用命令行自动比较两个文件的不同下载材料两个javascript文件:
game_old.js
game_new.js
打开命令行cmd,输入cd downloards进入存放上述两文件的路径
然后输入FC game_old.js game_new.js (FC = file compare)
回车,显示结果
Reflect: Using diff to Find Bugs
Choose Sublime as a text editorMake sure you can launch your editor from the command line
Windows
方法:
Find the directory where Sublime is located for you. For many people, this is C:/Program\ Files/Sublime\ Text\ 2/sublime_text.exe. To test this, run ls C:/Program\ Files/Sublime\ Text\ 2 within Git Bash. You should see sublime_text.exe listed. If you get the error No such file or directory, Sublime is located somewhere else for you and you’ll need to find it. For example, it might be under C:/Program\ Files\ (x86)`.
Run the following command in Git Bash: echo ‘alias subl=”C:/Program\ Files/Sublime\ Text\ 2/sublime_text.exe”’ >> ~/.bashrc If Sublime was in a different directory for you in step 1, use that directory.
Close and re-open Git Bash.
Type subl in Git Bash. If Sublime opens no further steps are required. If Sublime does not open continue with steps 5 - 7.
Test .bashrc by running the command source ~/.bashrc in Git Bash and retry typing subl to start sublime. If Sublime doesn’t start check the contents of the file ~/.bashrc created in step 2.
To ensure the .bashrc file contents is loaded each time you open Git Bash, edit ~/.bash_profile and add the following two lines. (Reference)
if [ -r ~/.profile ]; then . ~/.profile; fi
case “$-” in i) if [ -r ~/.bashrc ]; then . ~/.bashrc; fi;; esac
Close and re-open Git Bash. Type subl in Git Bash to check it starts correctly.
Set up your course workspace
相关文章推荐
- RPC failed; result=22, HTTP code = 411
- 查看github pages文档的方式
- 使用BAE的基于Web.py的简单博客程序
- git更新已經刪除的文件
- 提取Git每次提交后Commit的文件
- GIT迁移服务器
- 分布式版本管理git入门指南使用资料汇总及文章推荐
- git终极指南:在实际开发中的应用
- 两分钟学会如何在github托管代码
- Git远程操作详解
- 25个 Git 进阶技巧(翻译)
- 详解版本控制利器Git,SVN的异同以及适用范围
- Android自定义View实现仿GitHub的提交活跃表格
- Ruby实现的删除已经合并的git分支脚本分享
- 在 Shell 提示符中显示 Git 分支名称的方法
- Git使用基础篇(一些常用命令和原理)
- git eclipse 插件的安装
- git fork同步是什么意思?
- github配置使用指南