工具:git命令

git提交代码
1.git add filelist
2.git commit
如果需要重新提交用 git commit –amend
commit时默认使用nano编辑器,在~/.bashrc加上export GIT_EDITOR=vim改为vim编辑器
3.提交说明
 

      cause
       solution
4. Upload change:
   git push originHEAD:refs/for/master (repo upload)
5.gitk查看提交
扩展:
Please follow the below steps to check the bug.
1. 保证源码最新
    git pull orrepo sync
2.  cd .git/hooks and run "scp -P 29418jay.li@server_ip:hooks/commit-msg ./"
3. Create branch:
    git checkout -b exp_bug
4. Modify your code and add your change:
    git add filelist
5. Commit your changes:
    git commit
6. Add comments as below:
       Bug/Issue ID & description
       Root cause
       Fix solution
       Test & Result
7. Upload change:
git push origin HEAD:refs/for/master
8. Append your code change if needed(增加新的改动,重新提交):
    a. changecode
    b. git addfilelist
    c. gitcommit --amend
    d. git pushorigin HEAD:refs/for/master
9. Add reviewer in your branch for code review:
    http://172.16.20.20/gerrit/#/
10、
删除分支 git branch -D branch(分支名)
没有冲突的时候不需要add commit,直接push就可以
切换到以前分支git checkout branch_name,寻找commit ID(gitlog)然后新建分支(以防以前分支出问题),然后
git cherry-pick 12b0c23efa0cf7eaad7f1d920f224bce9ce79e36(分支号)
如果有问题 git status
需要用到 git add file_name
git commit --amend
如果出现BUG号与之前的不一致,用以下命令
git reset --hard 12b0c23efa0cf7eaad7f1d920f224bce9ce79e36(之前的commitID)
之后再add commit,最后
git push origin HEAD:refs/for/branch_new(新分支名)  
无法切换分支,需要把修改的内容提交或者暂存(git stash)
git checkout -b brach_new  commitID,新建一个分支,并切换到新分支
11、other command
adb root   root手机
adb remount   挂载手机的磁盘
adb push file  directory  将file文件 闯到手机的directory目录中。
adb devices   列出设备
adb logcat   在屏幕上打印logcat
adb logcat -v time | teetest.log   把log保存在test文件中。
adb logcat -v time >a.log    把log保存在a文件中,但是不在终端中输出,是覆盖
adb logcat -v time >>a.log   把log保存在a文件中,但是不在终端中输出,是追加
adb shell pm pathpakagename   查看手机里是否安装
hierarchyviewer 图形界面布局

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值