git whoami

$ git config --list

$ git config --global  --list

# quit
$ q
$ git config user.name xgqfrms
$ git config user.email xgqfrms@xgqfrms.xyz

git push bug

HTTPS bug

# https bug
$ git clone https://github.com/xgqfrms/remove-git-commit-history # $ git clone git@github.com:xgqfrms/remove-git-commit-history.git

SSH

SSH OK

# remove-git-commit-history
$ cd /Users/xgqfrms-mbp/Documents/GitHub/ # $ git clone https://github.com/xgqfrms/remove-git-commit-history
# SSH ok
$ git clone git@github.com:xgqfrms/remove-git-commit-history.git $ cd remove-git-commit-history $ git filter-branch --force --index-filter "git rm --cached --ignore-unmatch tools/sensitive-data.md" --prune-empty --tag-name-filter cat -- --all $ echo "tools/sensitive-data.md" >> .gitignore $ git push origin --force --all $ git push origin --force --tags # 强制取消引用本地仓库中的所有对象并进行垃圾回收 ???
$ git for-each-ref --format="delete %(refname)" refs/original | git update-ref --stdin
$ git reflog expire --expire=now --all
$ git gc --prune=now

从仓库中删除敏感数据

https://docs.github.com/cn/github/authenticating-to-github/removing-sensitive-data-from-a-repository

# ???

$ git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch tools/sensitive-data.md" \
--prune-empty --tag-name-filter cat -- --all
# OR # ???
$ cd tools
$ git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch sensitive-data.md" \
--prune-empty --tag-name-filter cat -- --all

git commits history 对比

https://github.com/xgqfrms/remove-git-commit-history/commits/master

before

after

SSH key

https://www.cnblogs.com/xgqfrms/p/5880270.html

SSH !== HTTPS ️ bug

GitHub Desktop HTTPS bug, 要使用 SSH 通过 terminal clone 才行,

  1. HTTPS, 只能通过 GitHub Desktop 执行 git pull

https://github.com/xgqfrms/remove-git-commit-history

  1. SSH

git@github.com:xgqfrms/remove-git-commit-history.git

refs

https://alvinalexander.com/git/git-show-change-username-email-address/

git whoami的更多相关文章

  1. UBUNTU上的GIT SERVER

    Git是一个开源的版本控制系统,由Linus Torvalds主导,用于支持Linux内核开发.每一个Git工作目录,都是一个完整的代码库,包含所有的提交历史.有能力跟踪所有的代码版本,而不会去依赖于 ...

  2. Mac常用基本命令/常用Git命令

    Git地址: https://github.com/mancongiOS/command-line基本命令 目录/文件的操作 mkdir "目录名" 在当前路径下创建一个文件夹 m ...

  3. 看日记学git摘要~灰常用心的教程

    看日记学git linux 命令行 cd ls / ls -a clear mkdir rmdir echo "hi, good day" > hi.txt touch he ...

  4. git 介绍及其使用总结

      版本控制 Git                   目录  目录 2 第1章 Shell和vi 4 1.1 什么是shell 4 1.2 shell分类 4 1.3 认识bash这个shell ...

  5. 一些常见的shell命令和git命令

    shell命令: pwd : (Print Working Directory) 查看当前目录 cd (Change Directory) 切换目录,如 cd /etc ./当前目录  ../上级目录 ...

  6. Terminal,git,vim常用命令整理以及删除本地git仓库

    Terminal常用命令 目录操作 ll 打开目录列表 ls -a 打开目录下所有文件列表 cd 切换到某目录 mkdir 创建目录 rmdir 删除空目录 rm -rf 目录名字 强制删除目录 mv ...

  7. MS-Windows中的Git命令行

    Git command line for MS-Windows Inhalt 1 Download and install, or copy the git command line suite fo ...

  8. Git 及 GitHub 使用

    Git bash 的常用命令 1. pwd    查看当前所在目录 2. cd cd ..         返回上一级 cd 目录    进入对应的目录 3. ls      查看当前文件夹的内容  ...

  9. 使用Git Hooks实现开发部署任务自动化

    前言 版本控制,这是现代软件开发的核心需求之一.有了它,软件项目可以安全的跟踪代码变更并执行回溯.完整性检查.协同开发等多种操作.在各种版本控制软件中,git是近年来最流行的软件之一,它的去中心化架构 ...

随机推荐

  1. 小米开源监控系统Open-Falcon安装使用笔记

    小米开源监控系统Open-Falcon安装使用笔记-BB保你大-51CTO博客 https://blog.51cto.com/chenguomin/1865550

  2. PyPy CPython C++ connects programs written in C and C++ with a variety of high-level programming languages

    PyPy 为什么会比 CPython 还要快? - 知乎 https://www.zhihu.com/question/19588346/answer/131977984 有个名词在现有的回答下面都没 ...

  3. Python骚操作从列表推导和生成器表达式开始

    序列 序列是指一组数据,按存放类型分为容器序列与扁平序列,按能否被修改分为不可变序列与可变序列. 容器序列与扁平序列 容器序列存放的是对象的引用,包括list.tuple.collections.de ...

  4. log4j 动态配置,重启项目配置失效问题

    公司项目升级之后,成功去掉了log4j.properties配置文件,实现页面动态配置日志级别. 很经典的两个配置,但是最终还是随着时代的进步而被优化,最终弄成了可配置项 但是随之问题就来了,当我启动 ...

  5. Latex安装教程(附美赛论文latex模板)

    @ 目录 Latex简介 安装步骤 texlive下载 配置环境变量 配置Texsudio latex版本helloworld 美赛 latex模板 Latex简介 LaTeX(LATEX,音译&qu ...

  6. 【HTB系列】靶机Frolic的渗透测试详解

    出品|MS08067实验室(www.ms08067.com) 本文作者:大方子(Ms08067实验室核心成员) Hack The Box是一个CTF挑战靶机平台,在线渗透测试平台.它能帮助你提升渗透测 ...

  7. HDU-6874 Decision 倍增 (2020 HDU多校 D7 D)

    Decision 题意 从 \([0,t]\) 中等概率的选取两个数字 \(v_1,v_2\), 定义序列 \(X\) 有 \(X_0=v1+v2,X_{n+1}=(aX_n+c) \mod m\). ...

  8. 搜索Ex (洛谷提高历练地)

    搜索Ex P1120 小木棍 题意:不超过65根长度小于50的小木棍(是由一批等长木棍砍断得到的),求原始木棍的最小可能长度 分析:优化+减枝爆搜 搜索状态要记录当前尝试的已经填好的长度,当前尝试填的 ...

  9. Educational Codeforces Round 90 (Rated for Div. 2) C. Pluses and Minuses(差分)

    题目链接:https://codeforces.com/contest/1373/problem/C 题意 给出一个只含有 $+$ 或 $-$ 的字符串 $s$,按如下伪代码进行操作: res = 0 ...

  10. HDU - 3282 优先队列的使用

    题意: 按照顺序给你n个数,当数的数量是奇数的时候就输出它们的中位数 题解: 优先队列默认是大顶堆,即priority_queue.top()是这个队列中的最大值 那么我们就可以先创造一个大顶堆优先队 ...