[git-users] rebase remove ignored files
Hello, I have got a large Git repo, but on beginning there wasn't a gitignore file, so during the time there are a lot of (binary) files which are stored in the repository. I have add these files to a gitignore and run git rm to remove them, but can I rebase the repo, so that these files are also removed from the history? I will shrink the repo size. Thanks Phil -- 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/groups/opt_out.
Re: [git-users] rebase remove ignored files
On Wed, Jan 22, 2014 at 9:36 AM, Philipp Kraus philipp.kr...@flashpixx.de wrote: Hello, I have got a large Git repo, but on beginning there wasn't a gitignore file, so during the time there are a lot of (binary) files which are stored in the repository. I have add these files to a gitignore and run git rm to remove them, but can I rebase the repo, so that these files are also removed from the history? I will shrink the repo size. What you are asking for is a way to rewrite history, and if you search for it you'll find several good resources on how to use `git filter-branch` which is the command you are looking for. Beware though, it's a Swiss Army Knife with nuclear power, run it on backups of your repo before you use it on the production repo. You can start here: http://git-scm.com/book/ch6-4.html#The-Nuclear-Option:-filter-branch You might also be interested in BFG, it's a tool I haven't had a reason to investigate further yet, but it sounds like it could be a more friendly option: http://rtyley.github.io/bfg-repo-cleaner/ http://www.theguardian.com/info/developer-blog/2013/apr/29/rewrite-git-history-with-the-bfg http://episodes.gitminutes.com/2013/04/gitminutes-06-roberto-tyley-on.html Please come back and let us know what you ended up using and how it went. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus -- 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/groups/opt_out.
Re: [git-users] I've got strange error when I run cherry-pick.
On Tue, 21 Jan 2014 23:19:00 -0800 (PST) seonguk.baek baekseon...@gmail.com wrote: I've got strange error when I run cherry-pick. While cherry-picking I ran into the conflict error. Usually, I can find unmerged files when I run git status. But there is no unmerged files. I can find strange files when I run git status like below. # Untracked files: # (use git add file... to include in what will be committed) # # test.conf~4f8a191... this is config file. How can I resolve problem? I might guess something gone awry and the error was not really about merge conflict. Or... whatever... Did you use something like `git mergetool` after hitting this situation? Does `git show 4f8a191` shows you something sensible rather than complaining about the non-existing revision? -- 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/groups/opt_out.
[git-users] Re: 2 Git servers
Teddy, Mirroring using Git w/Gitoite is fairly straight forward. Here is a link to the setup information: http://gitolite.com/gitolite/mirroring.html ~Bill On Sunday, January 5, 2014 7:45:43 PM UTC-8, Teddy - wrote: Dear git experts, May i ask for help on how to set the following? Goal : setup 2 git (gitolite) servers and regularly (auto script) sync them. Situation: *) 1 main git server in the main office in town A. *) There is a small office in town B : -) which has VPN link (slow and we dont want to rely heavily on the vpn connection) to main office in town A -) small grup of people -) we want to set up new dedicated machine as git (gitolite) server which will be the mirror of git server in main office (town A). It will have exact copy of all repos on server in main office. -) people in town B will use their local server to get the git repos *) Automatic and regularly, we want to sync ALL the git repos on both servers (any changes to any repo in main office, should be update to server in town B and vice versa). How to achieve this using the existing git feature (not using linux features such as rsync, sync script, etc)? Regards, Teddy -- 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/groups/opt_out.
Re: [git-users] rebase remove ignored files
Am Mittwoch, 22. Januar 2014 11:16:31 UTC+1 schrieb Magnus Therning: On Wed, Jan 22, 2014 at 9:36 AM, Philipp Kraus philip...@flashpixx.de javascript: wrote: Hello, I have got a large Git repo, but on beginning there wasn't a gitignore file, so during the time there are a lot of (binary) files which are stored in the repository. I have add these files to a gitignore and run git rm to remove them, but can I rebase the repo, so that these files are also removed from the history? I will shrink the repo size. What you are asking for is a way to rewrite history, and if you search for it you'll find several good resources on how to use `git filter-branch` which is the command you are looking for. Thanks, seems to be my mistake. I have searched for rebase and not filter branch. Phil -- 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/groups/opt_out.
Re: [git-users] gitignore change for tracked / untracked files
On Wed, Jan 22, 2014 at 11:50:16AM -0800, Philipp Kraus wrote: Hello, I have defined a gitignore with file pattern, which should be ignored eg: *.tmp *.bak ... I would change the gitignore file to: .* !*.cpp !*.res but I would also removed tracked files, which are added to the repo if the files does not match the ignore pattern. I would like to check the current files after changing the gitignore which will not be matched and after that I will remove them from the repo How can I do this I'm not 100% sure I understand what you wish to do, but you might want to look at `git clean`. By default it just lists the files it would delete, you have to pass it '-f' to actually remove stuff. You can also control whether you want it to deal with ignored files or not. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. -- Alan Kay signature.asc Description: Digital signature
Re: [git-users] I've got strange error when I run cherry-pick.
Thank you for reply. I did run 'git mergetool'. Console says that 'No files need merging' because there is no unmerged file. 4f8a191 commit is exist. It is that I cherry-pick commit. -- 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/groups/opt_out.