Mic_chen

It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
分享几个提高工作效率的技巧,欢迎跟帖补充。
Linux平台
Linux系统内核中,由于其能区分大小写的特性,故开发时同文件夹下面有很多同名文件,特别是软连接文件。
在windows下面不能区分大小写,会认为是同一个文件,因此linux内核和uboot等代码需要使用linux系统(虚拟机)映射的磁盘环境来解压、编译。

1、修改用户目录中 ~/.gitconfig配置如下
[user]
        name = chenqiliang
        email = chenqiliang@dingxin.com
[http]
        postBuffer = 500000000
        sslVerify = false
[pack]
        windowMemory = 100m
        SizeLimit = 100m
        threads = 1
        window = 0
[diff]
        external = /bin/git-meld.sh
[commit]
        template = ~/.gitCommitMsg
[core]
        editor = vim
[push]
        default = simple

2、使用meld 替代git 默认的 diff
I think Meld is a good gui tool for git diff.
setp 1:Ubuntu install meld
   
    sudo apt-get install meld
 
step 2:create a shell script named git_meld.sh
 
    vim ~/bin/ngit-meld.sh
 
   #!/bin/sh
    meld $2 $5
 
step 3: chang git_meld.sh permissions
 
    chmod +x ~/bin/git_meld.sh
 
step 4: config git diff tool
git config --global diff.external /bin/git-meld.sh
 
3、使用模板替代git commit -m
root@cql-VirtualBox:~# cat /home/cql/.gitCommitMsg
type(file: ): <提交描述>
#body
#footer
 
# - type:
#    feat(新特性),
#    fix(修改问题),
#    docs(文档修改),
#    style(代码格式修改注意不是 css 修改),
#    refactor(代码重构),
#    test(测试),
#    chore(其他修改比如构建流程依赖管理)
# - scope: (可以为空)
#    影响的的范围
# - subject
#    提交描述


裸机平台
1、裸机平台的编译调试
裸机平台随着代码的增加,如果使用的是网络文件系统(比如smb映射),编译会非常慢,建议裸机平台直接在win下编译、下载、调试,然后使用wingdb进行下载、运行、调试。
 
2、裸机平台的代码管理
因为裸机平台的编译在win下,所以代码管理也在win下,使用git bash可以处理基本的操作,但是一直没有解决好git diff使用外部比较工具(Beyond Compare)问题,考虑到裸机代码并不是很多,可以使用TortoiseGit,这个工具可以很好的解决使用外部比较工具问题,并且所有操作都可以像SVN一样,使用图形界面操作。
注:初次使用会出现No supported authenticcation methods available”,解决方案:https://blog.csdn.net/Jeffxu_lib/article/details/112259246






posted on 2022-06-22 18:54  Mic_chen  阅读(74)  评论(0编辑  收藏  举报