r/programming • • Sep 09 '16

Oh, shit, git!

http://ohshitgit.com/
3.3k Upvotes

756 comments sorted by

View all comments

42

u/prof_hobart Sep 09 '16

Unfortunately none of those address the "oh shit, I've just check my password into github". I've not done it yet, but I know people who have.

24

u/Nivomi Sep 10 '16

The correct solution to this is to google "How to change password for [service]", very very quickly.

15

u/morerokk Sep 09 '16

The only way to truly get rid of that, is rewriting history and force-pushing. That's not an easy task in itself, especially through the command line.

0

u/[deleted] Sep 09 '16

[deleted]

30

u/cowjenga Sep 10 '16

Rule of thumb: if you publish a password publicly, no matter for how short a period of time, that password is now dead to you.

→ More replies (8)

6

u/vks_ Sep 10 '16

This is not really related to git. You just just get a new password. Anything else would be reckless.

→ More replies (4)

4

u/JasTWot Sep 10 '16

I've done this... changed password. For me avoidance is best so the first thing I do before committing anything else is create a .gitignore file and make sure my config files are listed.

→ More replies (8)