删除项目里的大文件
git filter-branch --index-filter \
'find -name ''*.mp3'' -or -name ''*.ogg'' | xargs -d''\n'' rm -f'
#Suppose you want to remove a file (containing confidential information or copyright violation) from all commits:
git filter-branch --tree-filter 'rm filename' HEAD
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "<Old Name>" ];
then
GIT_COMMITTER_NAME="<New Name>";
GIT_AUTHOR_NAME="<New Name>";
GIT_COMMITTER_EMAIL="<New Email>";
GIT_AUTHOR_EMAIL="<New Email>";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
export GIT_AUTHOR_DATE="Fri Jan 2 21:38:53 2009 -0800"
export GIT_COMMITTER_DATE="Sat May 19 01:01:01 2007 -0700"
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Newname'; GIT_AUTHOR_EMAIL='newemail'; GIT_COMMITTER_NAME='Newname'; GIT_COMMITTER_EMAIL='newemail';" HEAD
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='newemail'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='newemail'
" HEAD
分享到:
相关推荐
CREATE Clone an existing repository $ git clone ssh://user@domain.com/repo.git Create a new local ...Change the last commit Don‘t amend published commits! $ git commit --amend 。。。等更多内容
git rebase -i HEAD~n,n条commit进行rebase 将需要修改的commit信息,将pick命令改为 r 命令;ESC 输入 :wq 回车 开始修改commit信息,修改完,ESC 输入 :wq 回车 打印出成功 git log oneline -n,查看n条log信息,...
使用方式: 1、解压package.rar package.rar 2、进入package文件夹,右键打开git bash 3、执行 sh install.sh 进行...4、执行git init 命令,查看当前目录是否生成 .git/gitcommit 和 .git/hooks/commit-msg 验证
公司要迁移git仓库,从仓库A迁移到仓库B,为了保留commit信息,特整理了两种方便的方式实现git仓库快速迁移,以及其他同事能快速切换库的建议。 第一种:使用镜像推送 git push --mirror,这种方式网上都有,算是...
git-remind是一个命令行工具,可以防止你忘记git-commit和git-push
idea commit 模板插件
04★Git入门★第一次提交_git_commit
一篇非常不错的关于提交GIT message的英文文章
* "git fetch" that grabs from a group of remotes learned to run the auto-gc only once at the very end. * A handful of Windows build patches have been upstreamed. * The code to read state files ...
I had to quickly develop an git version of such a plugin. For those who don't know the previous plugins, it basically helps you to help you with the following tasks and answer related questions Which...
This practical guide contains a wide variety of recipes, taking you through all the topics you need to know about to fully utilize the most advanced features of the Git system. Who this book is ...
git提醒 git-remind是一个命令行工具,可以防止您忘记git-commit和git-push。 产品特点 git-commit / git-push状态 ...brew install suin/suin/git-remind 手动地 从下载构建二进制文件。 组态 添加remind.paths你.
如何安装要安装钩子,请将预提交的文件复制到您的项目.git / hooks / pre-commit中: $ cp pre-commit .git / hooks / pre-commit; $ chmod + x .git / hooks / pre-commit; 该钩子带有“ die”,“ print_r”和“ ...
personal used template for git commit. including category/bug id...
shortcut of git add + git commit -m + git push Install npm i gpp -g Usage 一条命令,一次性执行: git add . 、 git commit -m 信息 和 git push gpp 任何需要commit的信息 带空格的提交: gpp 首页优化 接口...
git
git自动提交git自动提交工具,每隔几分钟提交一次安装$ npm install -g git-auto-commit用法gac [options]选项-h, --help :输出使用情况信息-V, --version version:输出版本号-t, --time <n> :两次提交之间的分钟...
The book also covers advanced repository management, including different options to rewrite the history of a Git repository. Finally, you will discover how you can work offline with Git, how to track...
:slot_machine: git-committerA node.js script to generate a git commit commit record.一个用来生成 git commit 提交记录的 node.js 脚本用来填满 github 绿色小方块(或者其他用途).BeforeAfter :sparkles: :...
VUE项目构建打包生成Git信息(VERSION和COMMITHASH文件) Git版本Webpack插件(git-revision-webpack-plugin) 可在构建过程中生成VERSION和COMMITHASH文件的Webpack插件。 官网:...