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

相关推荐
打盹的小pig7 小时前
git pull 报错
git
Leo.yuan8 小时前
企业Data Agent架构选型:帆软Dora基于NL2BI的现有BI体系复用方案
大数据·人工智能
Elastic 中国社区官方博客9 小时前
一条 ES|QL 查询,涵盖365天的审计日志:在热数据和可搜索快照上执行相同的搜索
大数据·运维·服务器·elasticsearch·搜索引擎·全文检索
亚川楼宇自控系统数据中心厂家10 小时前
事故风机监控:守护机房电池间等特殊区域的安全底线
大数据·安全
科技看点说12 小时前
2026年AI安全上市公司梳理:产品、认证与商业化进展
大数据·人工智能
镜子AI12 小时前
RPA智能名单激活系统设计:拟人化触达引擎与风控机制实践(镜子AI技术拆解)
大数据·人工智能·rpa
水圈模拟12 小时前
一场洪水的 AI 推演
大数据·人工智能
对空六课13 小时前
指标口径生效时间的版本查询实现
大数据·服务器·前端·算法·数据分析
liliangcsdn13 小时前
服务消费参数指标的解析与应用
大数据
对空六课13 小时前
RFM分层边界变化的回溯计算
大数据·服务器·前端·数据库·人工智能·算法·数据分析