git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* removing very old commits (including initial)
@ 2010-07-28  8:53 Mihamina Rakotomandimby
  2010-07-28  9:10 ` Ævar Arnfjörð Bjarmason
  2010-07-28  9:10 ` Santi Béjar
  0 siblings, 2 replies; 3+ messages in thread
From: Mihamina Rakotomandimby @ 2010-07-28  8:53 UTC (permalink / raw)
  To: git

Manao ahoana, Hello, Bonjour,

I work on a personnal project that become a little bit bigger over the
time.
Initially, it was a single file one, and that file contained database
credentials.
Later, I splat the project and put the credentials in another untracked
file (.gitignore).
When I want to publish this project, the history contains the initial
file, with the credentials. I dont want to publish that.

It's not a problem to definitely wipe the "single file" part of history
of this project, but interesting to keep the history after the
split&untracking.

How to?
Publishing will be through gitweb.

Misaotra, Thanks, Merci.

-- 

       Architecte Informatique chez Blueline/Gulfsat:
    Administration Systeme, Recherche & Developpement
                                    +261 34 56 000 19

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: removing very old commits (including initial)
  2010-07-28  8:53 removing very old commits (including initial) Mihamina Rakotomandimby
@ 2010-07-28  9:10 ` Ævar Arnfjörð Bjarmason
  2010-07-28  9:10 ` Santi Béjar
  1 sibling, 0 replies; 3+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-07-28  9:10 UTC (permalink / raw)
  To: Mihamina Rakotomandimby; +Cc: git

On Wed, Jul 28, 2010 at 08:53, Mihamina Rakotomandimby
<mihamina@gulfsat.mg> wrote:

> It's not a problem to definitely wipe the "single file" part of history
> of this project, but interesting to keep the history after the
> split&untracking.

git-filter-branch(1) will do everything you need.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: removing very old commits (including initial)
  2010-07-28  8:53 removing very old commits (including initial) Mihamina Rakotomandimby
  2010-07-28  9:10 ` Ævar Arnfjörð Bjarmason
@ 2010-07-28  9:10 ` Santi Béjar
  1 sibling, 0 replies; 3+ messages in thread
From: Santi Béjar @ 2010-07-28  9:10 UTC (permalink / raw)
  To: Mihamina Rakotomandimby; +Cc: git

On Wed, Jul 28, 2010 at 10:53 AM, Mihamina Rakotomandimby
<mihamina@gulfsat.mg> wrote:
> Manao ahoana, Hello, Bonjour,
>
> I work on a personnal project that become a little bit bigger over the
> time.
> Initially, it was a single file one, and that file contained database
> credentials.
> Later, I splat the project and put the credentials in another untracked
> file (.gitignore).
> When I want to publish this project, the history contains the initial
> file, with the credentials. I dont want to publish that.
>
> It's not a problem to definitely wipe the "single file" part of history
> of this project, but interesting to keep the history after the
> split&untracking.

If I understand you correctly you want to publish only the commits
since a particular commit, say "newroot". You can do it with "git
filter-branch". You have many different filters, but in you case I
would you grafts to cut the history and the rewrite the history with
git filter-branch.

In .git/info/grafts you put something like this:
HashOfTheNewRoot

It means that this commit has no parent, so you are cutting the
history. You can examine the history with git log or gitk to check
everything looks fine. To make it definitive you have to execute git
filter-branch:

$ git filter-branch -- --all

--all in this case means all the refs.

HTH,
Santi
>
> How to?
> Publishing will be through gitweb.
>
> Misaotra, Thanks, Merci.
>
> --
>
>       Architecte Informatique chez Blueline/Gulfsat:
>    Administration Systeme, Recherche & Developpement
>                                    +261 34 56 000 19
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-28  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28  8:53 removing very old commits (including initial) Mihamina Rakotomandimby
2010-07-28  9:10 ` Ævar Arnfjörð Bjarmason
2010-07-28  9:10 ` Santi Béjar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).