[git-users] Re: help with combine repositories

2012-05-28 Thread Stefan Szabo
I could actively tell git that two trees are the same.
I'll keep my eyes open for an answer to this one on this list, as this 
interests me as much as it does you. This is key for your problem.
But I can tell you this much: over here, where I'm working, we cloned 
entire reposes -- history and all -- so that we could easily pull from each 
other when needed, without worrying about differing histories. We're also 
using the patch-based approach, but the issue of failing to apply older 
patches to newer branches arises frequently. The way we're working around 
that, is to apply the older patch to a temporary branch starting from the 
commit the patch was created from, and then cherry-pick it onto the right 
branch. If there are no conflicts, git will do the right thing every time, 
and history is key.

Suppose, I have a repository with history on master.
Now I create a new branch new from nothing that includes all the same 
files as master, but no history. Just as if i created all the files now 
from scratch.
I'm not sure you can do that at all in git, i.e. branch from no commit. 
That, indeed, would be like cloning with no history. I'll also keep my eyes 
peeled for this one...

Thank you for your feedback as well.


vineri, 25 mai 2012, 22:43:36 UTC+3, 7ff a scris:

 Stafen, thank you for your reply,

 Am Freitag, 25. Mai 2012 13:49:52 UTC+2 schrieb Stefan:

 [...]There simply is no way to cherry-pick commits (or rebase branches) 
 from B into A, since git has no way to know that they are even the same 
 source tree, let alone have any common history among them.


 I did know about the different sha when they don't have a common history.
 I was under the impression, that I could actively tell git that two trees 
 are the same. But it seems I was remembering wrongly, git merge -s ours 
 does the opposite of what I want: merge in all the history without changing 
 files :-(

 To simplify the problem a bit (forget about the submodule and changes 
 files and two repositories for a moment):

 Suppose, I have a repository with history on master.
 Now I create a new branch new from nothing that includes all the same 
 files as master, but no history. Just as if i created all the files now 
 from scratch.

 master and new have no common history, right.

 But could I not merge new into master? There should not be any conflicts 
 since all files are the same. (?)

 Or if it is seen as a conflict that I want to recreate an already existing 
 file (even with the very same content), I could resolve this easily, by 
 just adding either version.
 What am I missing here?
 I might try this experiment later and see what's happening. I suspect that 
 it will not work that way even though I don't really understand why ...

 So, the way I see it, in your case you have but one choice, and that is to 
 move patches from B to A (and backwards, if A is indeed active itself!) and 
 applying them in the same sequence. Git also tries to make this easier for 
 you by providing things like format-patch, send-email, apply, etc.


 right, applying patch-files, or even copying files over and checking them 
 in again, that was my Plan B already.

 cheers
 Matt


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/BZ7sipuaNkUJ.
To post to this group, send email to git-users@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] Using Git in a web development environment (specifically with Coda 2 and a web server)

2012-05-28 Thread Serge Matveenko
On Mon, May 28, 2012 at 3:57 AM, Heronymo Allen heron...@gmail.com wrote:
 Locally, I've got my dev folder. On the server, I set up a git repository in
 the folder that contains test.domain.com, as well as another repository in
 the folder that contains the domain.com files.
 This means I'll have 3 repos. I can push commits to the test repo, then when
 I'm happy with it, I can push them to the live site?
 Since Coda allows just one server to be defined (I do hope they change
 that...) then perhaps I should connect it to the test domain, and then use
 the GitHub app to push the files to the main domain when they're good to go?
 I figure the files always come from my local, and they don't travel from the
 test domain to the live domain when ready.

As git is distributed scm you can use your described setup.

But personally I prefer to have central bare repository. You could use
github for this ot any other hosted solution or your personal git
server. There I setup permissions for users (other repository clones).
E.g. developer (you) can read and write to repository. Test user
(test.domain.com) has read only access. Production user (domain.com)
has read only access (and restricted to access release-* branches
only sometimes on paranoid configurations). Having such setup you are
able to checkout any branch on your test domain and on the production
when you need. Also you are know exactly what branch you are testing
or deploying. You can switch to test or production branch on your
development repository at any time and fix it if you need. And your
development branch(es) will not be touched by those modifications.

Here is blog post I've just found about one simple git usage workflow
http://thinkvitamin.com/code/source-control/git/our-simple-git-workflow/

There are infinite number of the possible git workflow schemes you are
free to implement.


-- 
Serge Matveenko
se...@matveenko.ru
http://www.ohloh.net/accounts/lig
http://ru.linkedin.com/in/sergematveenko

-- 
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-users@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.



[git-users] git freezes when writing objects

2012-05-28 Thread Collin Day
Hi all,

I am using git/gitolite for version control on my laptop.  After creating a 
repo with gitolite and cloning it using git clone git@localhost:myrepo and 
then filling it with files, it always seems to hang when writing objects.  
For example - here I am trying to commit 30 files with the largest being 
113K (no large binaries)

git push origin master
Counting objects: 30, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (28/28), done.
Writing objects:  90% (27/30)   

Then it just sits.  It could be that I am using ssh on the localhost - that 
might be a problem, but I have done it before on other machines and never 
had a problem, plus - I don't know how else to clone a gitolite manged 
repo.  Haven't been able to find anything useful and can't seem to find any 
suspicious log files.  Any suggestions would be really appreciated.

Currently using v1.7.8.6 but I have also tried 1.7.9.7 with same results.

Thanks!

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/psC1FyfX_58J.
To post to this group, send email to git-users@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.



[git-users] git freezes when writing objects

2012-05-28 Thread Thomas Ferris Nicolaisen
Have you tried pushing to a normal repository over ssh without gitolite?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/MRrIP0NI-JAJ.
To post to this group, send email to git-users@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.



[git-users] merge=ours in .gitattributes VS git merge master --strategy=ours

2012-05-28 Thread howard chen
(Have posted this question in SO already: 
http://stackoverflow.com/questions/10779235/prevent-merging-a-file-from-master-with-git)

I want to a file that will not be merged ever between branches, e.g. 
config.php

What I found that by using config.php merge=ours in the .gitattributes 
does not work as expected, but `git merge master --strategy=ours` works, 
any reason?

Command history:

mkdir git
 cd git
 git init
 echo B  b.txt
 git add b.txt 
 git commit -m 'Initial commit'

 

 echo b.txt merge=ours  .gitattributes
 git add .gitattributes 
 git commit -m 'Ignore b.txt'

 

 git checkout -b test # Create a branch
 git checkout master # Back to master and make change
 echo Only in master  b.txt
 git commit -a -m 'In master'
 git checkout test
 git merge master # The change in b.txt is being merged...


Any idea, or it is a bug?

Thanks.
 

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/VOODkPs-nEwJ.
To post to this group, send email to git-users@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.



[git-users] Re: git freezes when writing objects

2012-05-28 Thread Collin Day
No - but I figured out what the problem was.  Turns out that I had hpn 
(high performance) enabled on my ssh which is currently broken.  I rebuilt 
with that disabled and everything was fine.

Thanks!

On Monday, May 28, 2012 3:42:28 AM UTC-6, Thomas Ferris Nicolaisen wrote:

 Have you tried pushing to a normal repository over ssh without gitolite?

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/J32y_Mu55EkJ.
To post to this group, send email to git-users@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.



[git-users] Git SVN clone only one remote branch

2012-05-28 Thread Eduardo
Hello guys,

That´s my first experience with git and already have a problem to
solve.

 We work here in colaboration with others remote teams in a big
project. Each one of us have a exclusive branch in SVN central
repository, and the main trunk is used only from the central team.

I want to install a GIT a repository and clone only one branch.
Clone all the trunk, branches and tags folders is not and option,
because we will use only a little part of the SVN repo (only our
branch).

I started with the folowing command, but, as expected, nothing
happens:

git svn clone -s --no-minimize-url -r3:HEAD 
https://remote.svn.url/system/branch/mybranch/
/srv/repos/git/system-fetch

I inspected the .git/config file, and I guess something in there could
help me, but I really don´t know what to do.

Thanks in advance.

(sorry for any english errors)

-- 
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-users@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.