linux命令:
查看cpu:top
查看磁盘 :df -h
查看某文件夹下个文件大小并从大到小排序:du -sh * | sort -nr 在某个文件里查找所有的关键字符:grep '屏蔽' /store/logs/spiderPy.log
上传: rz
下载: sz
查看进程:ps -aux | grep python3
杀死进程:kill -9 1234
部署命令:nohup python3 abc.py &
git常用命令:
新建项目文件并上传到 ly 分支:
git add 文件名 # 添加
git commit -m '添加文件' # 提交文件
git push origin ly # 上传到远程
将test分支 合并到develop
git branch # 查看当前所在分支
git pull # 拉取最新分支
git checkout develop # 切换到develop分支
git merge test # 合并test分支代码
git add . # 添加到本地仓库
git commit -m 'test合并到develop' # 提交
git push # push到远程
把test分支的common目录 合并到develo分支
git branch # 查看当前所在分支
git pull # 拉取最新分支
git checkout develop # 切换到develop分支
git pull # 拉取最新分支
git checkout test common
git merge test # 合并test分支代码
git add . # 添加到本地仓库
git commit -m 'test合并到develop' # 提交
git push # push到远程
回退到指定版本:
- 查看所有的历史版本,获取你git的某个历史版本的id, git log
- 回退本地代码库:git reset --hard ID
- 推送到远程服务器:git push -f -u origin master
- 重新拉代码:git pull
强制合并分支:(old分支需要合并dev分支上代码)
git checkout Old
git merge --strategy=theirs dev
git push origin Old