[git-users] Re: Remove files and folders permanently from all commits, history and pack files

2014-07-17 Thread Thomas Ferris Nicolaisen
On Tuesday, July 15, 2014 4:41:20 PM UTC+2, cemico wrote:

 I have a git project in which all files are of about 700 MB size.
 In the .git folder lies a pack file which is 1.13 GB (Gigabyte)

 I accidently commited files and folders, which don't have to be under 
 version control.

 How do i remove let's say a concept_art folder from all commits (i have 
 about 50 commits by now) and from the pack file?

 I tried many things now. e.g:
 - 
 http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/
 - http://rtyley.github.io/bfg-repo-cleaner/
 - filter-branch with rm
 - git gc with prune=now and aggresive

 and the thing i thought which must really work:

 http://git-scm.com/book/en/Git-Tools-Rewriting-History#The-Nuclear-Option:-filter-branch

 None of the above work as expected or better: None work like i need it to 
 work.
 Some delete all commits (the most do that), some don't delete the files 
 from all commits, all(!) don't make the pack file smaller after deleting 
 all files and folders i don't want.


You're not giving us a lot to work with here. What were the commands you 
made? What was the output? What was the expected output?
 

 What i need is:
 - Exclude files and folders from my repo
 - Delete all references to theses files and folders from all commits
 - But don't delete any old commit
 - Rewrite the pack file, so that not any of the excluded files and folders 
 are in it

 What is the way to achieve that?


Filter-branch is the fallback tool when you know exactly want, and you 
don't mind the work of finding the right command to write, plus waiting for 
it to run (can take some time in large repositories).

Be aware that even after running filter-branch your repo will still be 
pretty big until you rinse out all the old stuff.

Here's an example I ran on some repos a while back:

# remove folders 'sandbox' and 'servers', and prune all empty commits:
git filter-branch -f --index-filter git rm -r -f --cached --ignore-unmatch 
sandbox servers --prune-empty

# clean away original refs left behind by filter-branch:
git for-each-ref --format=%(refname) refs/original/ | xargs -n 1 git 
update-ref -d
# empty reflog:
git reflog expire --expire=now --all
# remove remotes:
git remote rm origin
# remove work tree changes:
git reset --hard
# clean up:
git gc --aggressive --prune=now

Remember to always make backups before you start filter-branching!

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Re: Edit git patches with --minimal diff option

2014-07-17 Thread Thomas Ferris Nicolaisen
On Wednesday, July 16, 2014 8:44:59 AM UTC+2, Taowei Luo wrote:

 When running git diff or git format-patch, we know we may get a more 
 simply patch by --minimal option.

 I also want to split the changes in a file to several patches. So I use 
 git add -e or git add -p or git add -i.

 My problem is I can't get these two things together. Say, using git add -e 
 to edit patches on the minimal changes of a file. (It seems the --minimal 
 is not a default option and not even an option for git add)

 Anyone has ideas about this?


I'm not sure what the question is here. Do you just want to have 
patches/diffs of the things you've staged? git diff --staged  patch oughta 
do that..  

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Re: Remove files and folders permanently from all commits, history and pack files

2014-07-17 Thread Thomas Ferris Nicolaisen


On Thursday, July 17, 2014 8:04:23 AM UTC+2, Thomas Ferris Nicolaisen wrote:

 


Oh, that's what I get for reading this list oldest - newest :)

Duplicate post got some answers already here: 
https://groups.google.com/d/topic/git-users/HSVsp6Xv7OE/discussion 

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Git and binary files ... once more

2014-07-17 Thread Magnus Therning
On Wed, Jul 16, 2014 at 05:21:50AM -0700, Dominik Rauch wrote:
 Hi!
 
 Although I've read a lot of resources concerning the topic Handling
 binary files with Git I'm still confused. Hopefully you can help me
 to find definitive answers :-)
 
 If you ask people about Git and binary files the answers are
 often: Git is a SCM and not a backup solution or dependences
 should be referenced via Maven/NuGet/etc. only. Regarding the
 second argument: it is not always possible for us to do that, and
 the situation is (unfortunately) not going to change anytime soon.
 Therefore we want to know Git's limits before switching from
 Subversion to Git.
 
 Quantity of binary data: Some of our projects have up to 500MB of
 library dependencies which are updated (in parts) every two to three
 weeks.  However, the files are not too big by themselves, they are
 around 250 files ranging from 200KB to 10MB.
 
 Main question:
 The existence of tools like git-annex, git-fat, git-media, etc.
 hints that Git has problems with binary files in some way. Although
 I've studied as much internal docs as I could find, I could not find
 a clue why Git should handle binary files any worse than Subversion
 did. - Yes the repository size may get huge, however, initial
 cloning is a one-time process and does not affect our company too
 much.
 
 Does Git even have a problem with binary files? What's the problem
 exactly?  How does Subversion handle this in a better way? Is it
 about single files which are very huge (e.g. 3D models with more
 than 500MB file size) or are many small binary files a problem as
 well? Is it about initial cloning time only or does it affect the
 everyday work (committing, branching, etc.) as well?

Let me make an attempt at turning this around a little.  Why do you
look at your VCS to solve a build problem?

Your project has external dependencies on libraries.  You wish to keep
build times down by providing pre-built and vetted versions of these
libraries.  Exactly which version to use is a build-time problem, why
would you want to use a VCS to encode your build configuration?  Why
not keep the build configuration nearer the build instructions (e.g.
in a make file, or use CMake's ExternalData)?  And why rely on your
VCS to distribute your external dependencies, why not use rsync (to
distribute either the latest or all versions) or CMake's ExternalData?

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

In a hierarchy, every employee tends to rise to his level of incompetence.
 -- The Peter Principle


pgpYfwQnY7o40.pgp
Description: PGP signature


[git-users] Installing GIT on Ubuntu 12.04

2014-07-17 Thread Ellick Marquez
Hi everybody,
I want to install git on my computer with ubuntu 12.04 but when I put the 
next code sudo apt-get install git on my terminal, it shows me that the 
package git was removed or it doesn't exist.

Please help me, I really need to use GIT

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Installing GIT on Ubuntu 12.04

2014-07-17 Thread Gergely Polonkai
I haven't used Ubuntu in a while, but a few years ago it was called
git-core, not git.
On 17 Jul 2014 11:54, Ellick Marquez ellick.cr...@gmail.com wrote:

 Hi everybody,
 I want to install git on my computer with ubuntu 12.04 but when I put the
 next code sudo apt-get install git on my terminal, it shows me that the
 package git was removed or it doesn't exist.

 Please help me, I really need to use GIT

 --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Clone the git without tags.

2014-07-17 Thread seonguk.baek
Hi

I want to create bare git project without tags using clone.

But there is no option like --no-tags.

Is there any way to clone without tags like below?

$ git clone {path}/test.git --no-tags --mirror 

Thank you.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Git and binary files ... once more

2014-07-17 Thread Dominik Rauch
I'm not trying to solve a problem in our build system with a VCS. I'm 
trying to find out if we can safely switch from Subversion to Git without 
running into performance problems and furthermore I'm trying to find out 
more about the internals of Git and where all those rumors of Git is not 
able to handle binary files originate from.

Best regards,
Dominik

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Git and binary files ... once more

2014-07-17 Thread Magnus Therning
On Thu, Jul 17, 2014 at 03:08:40AM -0700, Dominik Rauch wrote:
 I'm not trying to solve a problem in our build system with a VCS.
 I'm trying to find out if we can safely switch from Subversion to
 Git without running into performance problems and furthermore I'm
 trying to find out more about the internals of Git and where all
 those rumors of Git is not able to handle binary files originate
 from.

Well, and why are you interested in finding that out?

My point is that you *already have* solved a build problem with
your existing VCS, and now you are exploring whether you can move to
Git with that solution intact.  AFAICS this is what prompted you to
find out more about Git's internals and its handling of binary files.

All I'm trying to do is offer another perspective on your issue, where
the premises change and your concern about Git's handling of binary
files simply goes away.  Of course you may completely disregard
anything I write :)

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

Any fool can write code that a computer can understand.  Good programmers
write code that humans can understand.
 -- Martin Fowler


pgpcQqSVCbKmE.pgp
Description: PGP signature


Re: [git-users] Installing GIT on Ubuntu 12.04

2014-07-17 Thread Peter van der Does
On 07/17/2014 12:12 AM, Ellick Marquez wrote:
 Hi everybody,
 I want to install git on my computer with ubuntu 12.04 but when I put
 the next code sudo apt-get install git on my terminal, it shows me
 that the package git was removed or it doesn't exist.
 
 Please help me, I really need to use GIT
 

To install you have to use sudo apt-get git-core

But 12.04 gives you git 1.7.0.4.

If you want the latest version check out my PPA:
https://launchpad.net/~pdoes/+archive/ubuntu/ppa

Currently it has version 2.0.2 available for Ubuntu versions:
- 10.04 (Lucid)
- 12.04 (Precise)
- 13.10 (Saucy)
- 14.04 (Trusty)

Just add the PPA and use sudo apt-get install git.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: Git and binary files ... once more

2014-07-17 Thread Dale R. Worley
 From: Dominik Rauch dominik.rauch@gmail.com

 (c) the estimated upper limits to work with a repository in reasonable time 
 on a normal machine (i.e. if my repository reaches 20GB and all of a 
 sudden it takes five minutes per commit, etc.)

Most of the cases where this sort of behavior is seen come from
thrashing, where the memory demand of the program exceeds the
available memory.  So you can look for these problems in advance by
asking What situations cause Git to consume a great deal of memory?

 From: Konstantin Khomoutov flatw...@users.sourceforge.net

 1) Git always compresses objects it writes; and after a certain
threshold it compacts loose object files into the so-called
packfiles which are big indexed archives.
 
What matters is that all these [de]compression operations are
performed in core -- that is, a file is slurped in, operated upon
then written out.  So you ought to have enough free physical memory
to do all of that.

However, you can limit the size of the pack files that Git will
generate through configuration:

[pack]
packSizeLimit = 99m

There may be ways to force Git to not attempt to compress files that
are above a certain size.

Doing that will probably eliminate most situations where Git attempts
to consume excessive memory.

Dale

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.