git环境开发问题-处理

【开发环境】

git问题

让git不跟踪.pyc文件:

首先把之前的pyc文件删除:

git rm -f ./\*.pyc

然后在.gitignore的末尾添加:

*.pyc

.vscode/

同时屏蔽掉pyc, .vscode/文件的数据的变更

git登陆问题

Command line instructions

You can also upload existing files from your computer using the instructions below.

Git global setup
git config --global user.name "xxx"
git config --global user.email "xxx@xxx.com"

git删除分支:

git branch -d local_branch_name

git删除commit信息

git commit --amend //这将会把最后一个commit合并到前一个提交中去

git修改commit分支

修改最近提交的 commit 信息

git commit --amend --message="modify message by daodaotest" --author="xxx <xxx@163.com>"

仅修改 message 信息

git commit --amend --message="modify message by daodaotest"

仅修改 author 信息

git commit --amend --author="xxx <xxx@xxx.com>"

git拉取远端分支合并本地:

git fetch --all

git reset --hard origin/feature-3.4.0-performance-optimazition

VSCode的debug配置

遇到闪退问题,将python 版本降低至其它版本即可。

参考 :

VSCode中python无法调试(调试闪退)的解决方法_vscode python debug闪退-CSDN博客

git 修改分支名称:

首先 git branch -m 旧分支名 新分支名

其次 git push --delete origin 旧分支名

将新分支名推上去

git push origin --set-upstream 新分支名

git ignore失效:

0. 进入项目路径

1. 清除本地当前的Git缓存

git rm -r --cached .

2. 应用.gitignore等本地配置文件重新建立Git索引

git add .

3. (可选)提交当前Git版本并备注说明

git commit -m 'update .gitignore'

git拉取远端分支到本地:

git fetch origin ac_branch:ac_branch 拉取远程分支到本地(方式二)

切换远程分支:

git checkout -b b350-py36pt1101cu102.-2.0.1 origin/b350-py36pt1101cu102.-2.0.1

git回退

git reset --hard d27236a72e8919051d2e0f356af9dabf7ffa09

commit信息修改

git commit --amend

删除分支:

git branch -D

修改commit之前的分支:

git log 找到需要修改分支 的ID

复制代码
` `git rebase -i 8876a66df1ea4a7e911c271b2bd3292ddfa1eca0`
`

Git 如何修改历史 Commit message

相关推荐
代码匠心1 天前
从零开始学Flink:Flink SQL四大Join解析
大数据·flink·flink sql·大数据处理
goodspeed2 天前
Git Worktree:多分支并行开发的利器
git·github
武子康2 天前
大数据-242 离线数仓 - DataX 实战:MySQL 全量/增量导入 HDFS + Hive 分区(离线数仓 ODS
大数据·后端·apache hive
Elasticsearch3 天前
需要知道某个同义词是否实际匹配了你的 Elasticsearch 查询吗?
elasticsearch
SelectDB3 天前
易车 × Apache Doris:构建湖仓一体新架构,加速 AI 业务融合实践
大数据·agent·mcp
雮尘3 天前
让 AI Agent 高效并行开发的命令-git worktree
人工智能·git·agent
武子康4 天前
大数据-241 离线数仓 - 实战:电商核心交易数据模型与 MySQL 源表设计(订单/商品/品类/店铺/支付)
大数据·后端·mysql
IvanCodes4 天前
一、消息队列理论基础与Kafka架构价值解析
大数据·后端·kafka
南果梨4 天前
OpenClaw 完整教程!从安装到使用(官方脚本版)
前端·git·开源
武子康5 天前
大数据-240 离线数仓 - 广告业务 Hive ADS 实战:DataX 将 HDFS 分区表导出到 MySQL
大数据·后端·apache hive