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. ChannelNets: 省力又讨好的channel-wise卷积,在channel维度进行卷积滑动 | NeurIPS 2018

    Channel-wise卷积在channel维度上进行滑动,巧妙地解决卷积操作中输入输出的复杂全连接特性,但又不会像分组卷积那样死板,是个很不错的想法   来源:晓飞的算法工程笔记 公众号 论文: C ...

  2. Scheduling Multithreaded Computations by Work Stealing

    steal.pdf http://supertech.csail.mit.edu/papers/steal.pdf This paper studies the problem of eciently ...

  3. 用git合并分支时,如何保持某些文件不被合并

    用git合并分支时,如何保持某些文件不被合并_fkaking的专栏-CSDN博客_git 合并分支 https://blog.csdn.net/fkaking/article/details/4495 ...

  4. rehash (重新散列)

    rehash - Redis 设计与实现 http://redisbook.com/preview/dict/rehashing.html

  5. SRE SLO On-Call 流程机制 系统稳定性

    开篇词|SRE是解决系统稳定性问题的灵丹妙药吗? https://time.geekbang.org/column/article/212686 这两年,近距离地接触了很多不同类型.不同规模的企业 I ...

  6. 任何Python线程执行前,必须先获得GIL锁,然后,每执行100条字节码,解释器就自动释放GIL锁,让别的线程有机会执行

    任何Python线程执行前,必须先获得GIL锁,然后,每执行100条字节码,解释器就自动释放GIL锁,让别的线程有机会执行 多线程 - 廖雪峰的官方网站 https://www.liaoxuefeng ...

  7. 机器学习基础——规则化(Regularization)

    在机器学习中,我们一直期望学习一个泛化能力(generalization)强的函数只有泛化能力强的模型才能很好地适用于整个样本空间,才能在新的样本点上表现良好. \[y=a+bx+cx^2+dx^3\ ...

  8. 利用Javascript制作网页特效(窗口特效)

    全屏显示窗口 利用fullscreen=yes可以制作全屏显示窗口. ①:在body标签内输入以下代码: <div align="center"> <input ...

  9. hadoop知识点总结(三)YARN设计理念及基本架构

    YARN设计理念与基本架构 1,MRv1的局限性:扩展性差,可靠性差,资源利用率低,无法支持多种计算框架 2,YARN基本设计思想 1)基本框架对比 Hadoop1.0中,JobTracker由资源管 ...

  10. JDK-7新特性,更优雅的关闭流-java try-with-resource语句使用

    前言 公司最近代码质量整改,需要对大方法进行调整,降低到50行以下,对方法的深度进行降低,然后有些文件涉及到流操作,很多try/catch/finally语句,导致行数超出规范值,使用这个语法可以很好 ...