Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a tip to remove sensitive data from history (after a push) #153

Merged
merged 1 commit into from
Dec 3, 2017

Conversation

eliranmal
Copy link
Contributor

No description provided.

@eliranmal eliranmal mentioned this pull request Oct 30, 2017
@@ -187,6 +188,11 @@ git help -g
git log -S'<a term in the source>'
```

## Remove sensitive data from history, after a push
```sh
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch <path-to-your-file>' --prune-empty --tag-name-filter cat -- --all && git push origin --force --all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

force push...can you elaborate, please?

Copy link
Contributor Author

@eliranmal eliranmal Nov 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

force is there as the command should verify the overwrite of existing remote data. see this post on github help.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand what force dose, but we can't avoid it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the purpose of this command is to be destructive to the history. why would we want to avoid it?
is there anything inherently wrong with using force?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing wrong was looking for alternatives, we get this in, for now, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright 👍

as usual, thanx for the merge, i really love (contributing to) this project ❤️

@hemanth hemanth merged commit f5b193c into git-tips:master Dec 3, 2017
blanjatest2 pushed a commit to blanjatest2/tips that referenced this pull request Apr 15, 2020
add a tip to remove sensitive data from history (after a push)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants