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. Building a high performance JSON parser

    Building a high performance JSON parser https://dave.cheney.net/high-performance-json.html

  2. JAVA中关于基本数据和引用数据参数传递过程

    基本数据和引用数据参数传递过程 案例1:判断程序的输出结果 class Demo{ public static void main(String[] atgs){ int x =4; show(x); ...

  3. 配置《Orange's一个操作系统的实现》环境心得

    <Orange>这本书开篇第一章就做了一个实例,编写了一段引导扇区的代码,但是引导介质仍然采用了已被淘汰多年的软盘.在经历了两天的痛苦查找后终于找到了最方便的解决办法,在此做一下记录,希望 ...

  4. Scala-文件操作

    Scala-文件操作 一.遍历一个文件中的每一行 方法一: 使用Source.getLines返回的迭代器 方法二: 将Source.getLines返回的迭代器,转换成数组 方法三: 调用Sourc ...

  5. Java异常封装(自定义错误信息和描述)

    一.checked异常和unchecked异常 checked异常: unchecked异常: 二.异常封装示例 2.1.添加一个枚举LuoErrorCode.java如下: 2.2.创建一个异常类B ...

  6. ARP病毒系列——基础篇

                              概念和关系介绍:(ARP.IP.Mac 三者的关系) ARP,全称Address Resolution Protocol,中文名为地址解析协议,它工 ...

  7. JVM之堆体系结构

    1.Heap堆(Java7之前) 一个JVM实例只存在一个堆内存,堆内存的大小是可以调节的.类加载器读取了类文件后,需要把类.方法.常变量放到堆内存中,保存所有引用类型的真实信息,以方便执行器执行,堆 ...

  8. 阅读笔记:Very Deep Convolutional Networks for Large-Scale Image Recognition

    摘要: 在这篇论文我们主要研究卷积神级网络的深度对大范围图像识别效果的影响,我们发现增加神经网络层数增加到16-19层时我们的实验结果有很大的提高.这使得我们在2014年的ImageNet Chall ...

  9. Codeforces Round #135 (Div. 2) D. Choosing Capital for Treeland

    time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standa ...

  10. AcWing 239.奇偶游戏 (带权并查集/种类并查集)

    题意:你和朋友玩游戏,有个一\(01\)序列,你每次给出一个区间,朋友会回答这个区间中的\(1\)的个数是奇数还是偶数,但是你亲爱的朋友可能在撒谎,问在哪个询问你能确定你的朋友在撒谎,输出回合数. 题 ...