# Help before pushing to remote repo.

2 messages from 2008-06-06 to 2008-06-06. Participants: Ralph Churchill, Eric Raible.
Thread: https://gitlist.dev/t/13841

## Ralph Churchill, 2008-06-06 23:13

Subject: Help before pushing to remote repo.
Message-ID: <351720.25873.qm@web30503.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/351720.25873.qm%40web30503.mail.mud.yahoo.com

```
I have a file that contains a "secret" key value. I unwittingly committed two commits to my local repository that contained the value. Is there anything I can do to prevent the value from making it to the version(s) visible in the remote repository? I don't know if I can "edit" the commits or change the history of the file.

I'm using github for the remote repo. and am, obviously, very new to Git.


      

```

## Eric Raible, 2008-06-06 23:28

Subject: Re: Help before pushing to remote repo.
Message-ID: <loom.20080606T232618-691@post.gmane.org>
URL: https://gitlist.dev/e/loom.20080606T232618-691%40post.gmane.org
In-Reply-To: <351720.25873.qm@web30503.mail.mud.yahoo.com>

```
Ralph Churchill <mrchucho <at> yahoo.com> writes:

> 
> I have a file that contains a "secret" key value. I unwittingly committed two
commits to my local repository
> that contained the value. Is there anything I can do to prevent the value from
making it to the version(s)
> visible in the remote repository? I don't know if I can "edit" the commits or
change the history of the file.
> 
> I'm using github for the remote repo. and am, obviously, very new to Git.

Assuming that you haven't yet pushed it to the remote repository...

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#fixing-a-mistake-by-rewriting-history
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#undoing-a-merge

```
