不灭的焱

革命尚未成功,同志仍须努力下载JDK17

作者:Albert.Wen  添加时间:2015-11-16 21:56:01  修改时间:2024-04-14 14:42:37  分类:电脑/软件使用  编辑

第一步:配置 git.exe

File -> Default Settings -> Version Control -> Git -> Path go Git executable: D:\Program Files\Git\bin\git.exe

 

第二步:clone 项目

VCS -> Checkout from Version Control -> Git -> Clone Repository -> 填写项目的git信息,如

Git Repository URL: https://git.oschina.net/xxx/php-note.git
Parent Directory: d:\PHP\xampp2\htdocs\
Directory Name: php-note

注意:如果目录已存在,如 d:\PHP\xampp2\htdocs\php-note,需要把它删除 或 重命名。

 

第三步:让项目集成 VCS

VCS -> Enalbe Version Control Integration -> Select a version control system to associate with the project root,选择 Git

 


 

注意,在 pull 文件到oschina服务器时,会弹框提醒“是否自动转换换行符?”,这里选择不转换,即“Commit As Is”,如下图所示:

 


 

Ubuntu 安装 git

sudo apt-get install git

 


 

提交SVN时,注意事项

1、如上图所示,提交SVN之前,右边除了勾选第一个复选框外,其他的都不要勾选,否则会出现各种 格式化代码等窜改代码的问题,如

勾选了“Cleanup”,代码

onclick="leave_del('<!--{$val['leaveId']}-->')"

会被窜改为

onclick="leave_del('<!--{$val['leaveId;']}-->';)"

这不是我想要的结果!