[git-users] get rid of old commits

2010-09-20 Thread canna
Hello Everybody!

I hope someone can help me with this because I didn't find any
information on that subject in the internet, and I'm struggling with
this for a whole two days now

we're using git for a year now and the repository grow very big,
the main remote repository is located on a local network computer and
all the developers push and pull from it

the problem is, it's taking a lot of time for simple everyday
operations like pull, push, show log (TortoiseGit), check for
modifications (TortoiseGit) - to complete. also all the old commits
are irrelevant (there is no way in the world we could ever revert to
those commits)

is there a way to somehow cut off half of the repository, meaning get
rid of the old commits, for instance throw away all the first half of
year of commits in order to make the repository lighter and easier to
manage?

Scott Chacon (http://git-scm.com/) recommended his post: Replace
Kicker (http://progit.org/2010/03/17/replace.html).  I like the idea
of pushing all history (old commits) to a separate ("history")
repository while removing the same history from the main repository.
unfortunately his tutorial doesn't explain how to synchronize this
change with the main remote repository and with all other local
branches.

we are around 5 developers, so it's still reasonable to go over all
the repositories of everybody and rebase every brunch in the system
manually if that what it's take to make it work...

Thank you for any help on that subject!
Netta

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] get rid of old commits

2010-09-29 Thread Brett Viren
On Mon, Sep 20, 2010 at 11:57 AM, canna  wrote:

> the problem is, it's taking a lot of time for simple everyday
> operations

Have you run "git gc" ever?

-Brett.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] get rid of old commits

2010-09-29 Thread Adam Prescott
My understanding is that git will handle running "git gc" for you when
you have a fair amount of stuff it can clear up (I've seen it do this
automatically, personally, but I could be wrong). So even if the
answer is "no", it might not be the answer to the question, "has 'git
gc' ever been run?"

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] get rid of old commits

2010-09-30 Thread Peter
You could try to  run "git config --global gc.auto 100" on your repo machine
and work machine.


"If the number of loose objects exceeds the value of the gc.auto configuration
variable, then all loose objects are combined into a single pack usinggit
repack -d -l."

On Thu, Sep 30, 2010 at 2:08 AM, Adam Prescott  wrote:

> My understanding is that git will handle running "git gc" for you when
> you have a fair amount of stuff it can clear up (I've seen it do this
> automatically, personally, but I could be wrong). So even if the
> answer is "no", it might not be the answer to the question, "has 'git
> gc' ever been run?"
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To post to this group, send email to git-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> git-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/git-users?hl=en.
>
>


-- 
liuhui998 blog http://liuhui998.com

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] get rid of old commits

2010-09-30 Thread Peter
If you really want to remove old commit, you can just use "git rebase -i"

http://book.git-scm.com/4_interactive_rebasing.html

pick fc62e55 added file_size
pick 9824bf4 fixed little thing
pick 21d80a5 added number to log
pick 76b9da6 added the apply command
pick c264051 Revert "added file_size" - not implemented correctly

# Rebase f408319..b04dc3d onto f408319
#
# Commands:
#  p, pick = use commit
#  e, edit = use commit, but stop for amending
#  s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#


"The last useful thing
that interactive rebase can do is drop commits for you. If instead of
choosing 'pick', 'squash' or 'edit' for the commit line, you simply remove
the line, it will remove the commit from the history."



On Thu, Sep 30, 2010 at 3:47 PM, Peter  wrote:

> You could try to  run "git config --global gc.auto 100" on your repo
> machine and work machine.
>
>
> "If the number of loose objects exceeds the value of the gc.auto configuration
> variable, then all loose objects are combined into a single pack usinggit
> repack -d -l."
>
>
> On Thu, Sep 30, 2010 at 2:08 AM, Adam Prescott wrote:
>
>> My understanding is that git will handle running "git gc" for you when
>> you have a fair amount of stuff it can clear up (I've seen it do this
>> automatically, personally, but I could be wrong). So even if the
>> answer is "no", it might not be the answer to the question, "has 'git
>> gc' ever been run?"
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Git for human beings" group.
>> To post to this group, send email to git-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> git-users+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/git-users?hl=en.
>>
>>
>
>
> --
> liuhui998 blog http://liuhui998.com
>
>
>


-- 
liuhui998 blog http://liuhui998.com

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.