git diff $(git rev-list -n1 --before="1 day ago" master)
remove a file from a git repository with:
git filter-branch --tree-filter 'rm file'
remove a folder from a git repository with:
git filter-branch --tree-filter 'rm -rf directory'
This removes the directory or file from all the commits
you can specify a commit by using:
git filter-branch --tree-filter 'rm -rf directory' HEAD
Or an range
git filter-branch --tree-filter 'rm -rf vendor/gems' t49dse..HEAD
To push everything to remote, you can do:
git push origin master --force
[下午 03:21:33] Ash Wu: 我簡單講
[下午 03:21:42] Ash Wu: 你還是要學一下啊XD
[下午 03:21:51] Ash Wu: 1. git remote add 我的官方 repo
[下午 03:22:00] Ash Wu: 2. git fetch 下來 我的 官方 master
[下午 03:22:08] Ash Wu: 3. 用你的 branch rebase 我的官方 master
[下午 03:22:18] Ash Wu: 4. push 5.pull request