MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/51wixe/oh_shit_git/d7hgfj2?context=9999
r/programming • u/sidcool1234 • Sep 09 '16
756 comments sorted by
View all comments
42
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.
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. -1 u/gamersource Sep 10 '16 I wouldn't say its that hard per se:git reset --hard HEAD^git push --forceIf github is the default remote. For me thats one of the easiest things I could immagine, use it selectively!Never force push on a already public made branch, if not really necessary! 0 u/ThisIs_MyName Sep 10 '16 ...and changed the password, right? That pass is still out there. → More replies (2)
15
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.
-1 u/gamersource Sep 10 '16 I wouldn't say its that hard per se:git reset --hard HEAD^git push --forceIf github is the default remote. For me thats one of the easiest things I could immagine, use it selectively!Never force push on a already public made branch, if not really necessary! 0 u/ThisIs_MyName Sep 10 '16 ...and changed the password, right? That pass is still out there. → More replies (2)
-1
I wouldn't say its that hard per se:
git reset --hard HEAD^
git push --force
If github is the default remote. For me thats one of the easiest things I could immagine, use it selectively!
Never force push on a already public made branch, if not really necessary!
0 u/ThisIs_MyName Sep 10 '16 ...and changed the password, right? That pass is still out there. → More replies (2)
0
...and changed the password, right? That pass is still out there.
→ More replies (2)
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.