문제

I have a git repo that I have decided to make public, which means moving database connection info into a .gitignored file. However, my repository history still contains the commits that I added and then removed the information.

I have tried the solution from this question using interactive rebase, but this seems to only allow me to change/reorder the commit message, not the code that was included in the commit.

도움이 되었습니까?

해결책

You should read this article from Github:

Remove sensitive data

But, the most important part of the article is certainly this quote:

Danger: Once the commit has been pushed you should consider the data to be compromised. If you committed a password, change it! If you committed a key, generate a new one.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top