我在这里

🏠 HOME 🗂️ DOCS 🔗 LINK 👴🏻 ABOUT

github删除远程分支提交历史

2017-08-30 23:00

  • 笔记
  • git
  • github

github 代码提交多了以后 会有很多历史记录,这些历史记录大多没有重要信息切这些历史纪录中可能会包含项目里密码等敏感信息,在网上找了很久,找到一下方法,亲测有效,使你的git仓库成为一个全新的仓库,并保持代码不变。

1.Checkout

git checkout --orphan latest_branch

2.add all the files

 git add .

3.Commit the changes

git commit -am 'commit'

4.Delete the branch

git branch -D master

5.Rename the current branch to master

git branch -m master

6.Finally, force update your repository

git push -f origin master

参考地址:stackoverflow

浅谈数据库被黑经历

2017-09-01 18:44

hello manjaro

2017-05-22 15:01

Sukoshi

Sukoshi

不觉得鹿角即可爱又有攻击性吗(

Related Posts

  • 在CSS变量中使用SCSS变量无效
  • CSS使用字体新姿势 unicode-range用法与使用场景
  • ES6中的模块
  • zsh和oh-my-zsh常用配置和命令
  • 日语五十音
  • 五十音补充笔记

Categories

  • 笔记 20
  • 归档记录 9
  • 碎碎念 8
  • QAQ 7
  • doc 6
  • mv 3
show all

Tags

摄影 日常 js 浪 mongodb 日记 碎碎念 canvas cos css git github
show all

© 2022 Sukoshi.

蜀ICP备15014309号

Powered by Hugo Theme - kagome

🌞 light 🌛 dark 🤖️ auto