Source: https://help.github.com/articles/removing-sensitive-data-from-a-repository/
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch <PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA>' \
--prune-empty --tag-name-filter cat -- --all
<PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA>
代換成你要取代掉的敏感資料即可,指令會把所有與這個檔案有關的紀錄全部刪除考量到可能會有敏感資料的問題,所以在 local 端放上這些敏感資料後、開一個新的 branch 來對 heroku 做 deploy
Step 1: 建立一個 local 端 branch
git checkout -b release-xx
Step 2: 在這邊補上你的敏感資料(heroku database key … etc)
Step 3: 使用這個 local 端的 branch 對 heroku 做 deploy,等待指令完成即可完成部署
git add .
git commit -m "Whatever you want to say"
git push heroku release-xx:master
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing