安装工具:
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
查看ssh配置文件:
~/.ssh/
ll ~/.ssh/
输出key:
cat ~/.ssh/id_rsa.pub
生成key:
ssh-keygen
cat ~/.ssh/id_rsa.pub
然后将生成的id_rsa.pub输出并配置到gitlab上面的个人的setting
设置远程仓库地址:
git remote set-url origin git@git.lksense.com:python/industrial-defect-detection.git
将当前修改的内容暂存到栈里面
git stash
展示保存的内容
git stash show
拉取远程最新代码
git pull
创建新的版本
git checkout -b ref.dev.device
stash内容弹出到新的版本:
git stash pop
查看pop之后当前版本的状态
git status
查看共同修改的地方:
git diff app/vrs/views.py
git add.
取消commit
git reset HEAD~1
commit:
git commit -m
push到远程指定版本:
git push -u origin ref.dev.device
12:01 # git push -u origin ref.dev.device -f
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: View merge request for ref.dev.device:
remote: http://git.lksense.com:9988/python/industrial-defect-detection/-/merge_requests/1464
访问 http://git.lksense.com:9988/python/industrial-defect-detection/-/merge_requests/1464
提交merge请求
git clone之后 可以用以下命令连接远程仓库:
source ~/.bashrc 使用工具
git remote set-url origin git@git.lksense.com:python/industrial-defect-detection.git
python setup.py sdist
可以打包
查看依赖:
pipreqs . --encoding=utf8 --force
不确定版本可以用 pip uninstall查看一下
每次不用输入账号密码
git config --global credential.helper store
git rebase --continue
git rebase --about (有解决不了的冲突)
git status
上传目标包:
twine upload -r lksense
参考:https://zhuanlan.zhihu.com/p/506645013
git cherry-pick 56edb33
/opt/virtualenvs/defect_detect/bin/python lk_compiler.py ‘/opt/software/industrial-defect-detection’ build_ext -i -j 8
watch -n 2 -10 /定时刷新文件
vim 全部替换