最近在使用Source Insight查看一些源代码,使用github进行版本控制,在进行中文注释的时候,上传到github后,中午注释部分是乱码。原因是Source Insight一直没有对uft8有正面的支持,其默认编码方式为ANSI码。这算是SI的硬伤。
需要用utf8中文注释的如何办?不过在不久前有人开发出了让Source Insight默认使用utf8作为编码的补丁。
64位:补丁
32位:补丁
安装说明:解压后将msimg32.dll sihook.dll siutf8.dll 到Source Insight 3.X安装目录。重新打开SI后即可。
支持utf-8的Source Insight的解压即可使用版http://download.youkuaiyun.com/detail/tfygg/9337471
【github使用】
1、查看本地仓库:ls
2、cd进入分支后,
查看本地分支:git branch +分支名,
删除本地分支:git branch -d +分支名
查看本地和远程分支:git branch -a (远程分支是红色)。
删除远程分支:git push origin :<远程端分支>
3、 更新代码:
git push origin master //把本地源码库push到Github上
git pull origin master //从Github上pull到本地源码库
git pull //从Github上的仓库pull到本地相应的源码库
4、撤销commit
git log:查看日志,找到需要回退的那次commit的 哈希值
E:\github\Computer-Vision [master]> git log commit 732280b528905203c382318211aabd4a80a24c79 Merge: 2044ddd 29826ba Author: tfygg <tfyengineer@163.com> Date: Tue Jan 26 16:00:13 2016 +0800 Merge branch 'master' of https://github.com/tfygg/Computer-Vision commit 2044dddd1798f7131c3c233bbbdc16bf1f5c0811 Author: tfygg <....................................> Date: Tue Jan 26 15:59:26 2016 +0800 lib commit 66fc2668744584a509abbc5187cd20886facf0ec :
git reset --hard commit_id:找到需要回退的那次commit的 哈希值,进行退回。
git reset –mixed:此为默认方式,不带任何参数的git reset,即时这种方式,它回退到某个版本,只保留源码,回退commit和index信息
git reset –soft:回退到某个版本,只回退了commit的信息,不会恢复到index file一级。如果还要提交,直接commit即可
git reset –hard:彻底回退到某个版本,本地的源码也会变为上一个版本的内容