git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Patrick Neuner - Futureweb.at" <neuner@futureweb.at>
To: "Andreas Ericsson" <ae@op5.se>
Cc: <git@vger.kernel.org>
Subject: AW: Parallell Development / Switching to GIT
Date: Sun, 28 Jun 2009 19:51:26 +0200	[thread overview]
Message-ID: <B81058949321C8439B9D742F5F8D8FCA01A75C1D@hpserver.intranet.local> (raw)
In-Reply-To: <4A434D6F.2090105@op5.se>

Hi,

I have been installing and trying out GIT by now and like it. 

I am not sure if I understood everything correctly though. 
Let me point out 2 parts I just couldn't find a solution for so far: 

We are still having the scenario of 2 branches. 
Master
Development. 

1) What if I only want to merge a specific file/directly, but not the whole branch, is there a way?

I found that I can git checkout development directory/ but this only works for new added files, 
it would overwrite changes within the same file of master, if it exists. So it's pretty similar to just copiing files over and commit.

The reason is, that external developers will only commit to development branch. 
They are working on new features, and sometimes some small bugfixes, or design templates. 
Those need to be merged separately, and we try to not have more branches. As developers can access our testserver and then see what they have done and test functionality. 

If we do different branches, testing on the testserver would always involve merging the branch into development branch, and especially for templates,
this isn't a one time update, but might be there are quite some commits, until everything fits.

Is there a way?
  
2) We are using gitosis to give external developers access to the branches and have some kind of access restriction. 
But we are only able to limit push rights, not pull rights. In most cases, that's not a problem, if they see master
And development, but sometimes (like for external designers), we might want them to only be able to checkout some directories. 

Important here is, that merging will still work (like later into the master), and that files go directly into development branch. 
Same as above, they need to test functionality, so switching branches on the testserver wouldn't work. 

As I am coming from an svn background, where both things were possible, I wonder if I just didn't hit the right trail
to get this accomplished with git?

Thanks

Patrick


-----Ursprüngliche Nachricht-----
Von: Andreas Ericsson [mailto:ae@op5.se] 
Gesendet: Donnerstag, 25. Juni 2009 12:12
An: Patrick Neuner - Futureweb.at
Cc: git@vger.kernel.org
Betreff: Re: Parallell Development / Switching to GIT

Patrick Neuner wrote:
> Hello,
> 
> we are using SVN right now and with the way we do / need to develop, it seems we
> are constantly get in a merging horror. 
> I did quite some reading about git now, but I am still not really sure if that
> what we try to accomplish can be done with git,
> Or if we are really doing something a too odd way. 
> 

Conflicts will still happen with git, but "merge horror" no longer applies,
for a couple of reasons (I come from a similar background, but switched to
git in late 2005).
1. In SVN (and CVS), you're merging *unknown changes* into *unsaved state*.
   You haven't committed your changes to the repository before you merge,
   and you haven't (usually) looked at the upstream changes before you
   try to merge. Git doesn't have this problem (and neither does any other
   distributed version control system), since you first fetch changes from
   someone else and then merge them into an already saved state. When a
   merge conflict resolution goes wahoonie-shaped, you can easily restore
   either of the previously saved states with zero hassle.
2. Git has "rerere", which records and reuses previously resolved merge
   conflicts, so you won't get the same merge-conflict more than once, if
   you enable rerere.
3. SVN (and CVS) won't remember which changes are already merged in, so
   they will fail horribly at repeated same-branch merges. Git (and other
   DAG-based scm's) can and do calculate the merge-base for you so you'll
   never have to think about that yourself.

> Let my try to describe – I also added an image. 
> 
> ---- repo 1
>   |
>    - repo 2 (=branch of repo 1 - for our external developers)
> 
> We have the main branch and 2nd branch for external developers. 
> 
> We work inside the repo1, which are usually features/updates that go life after
> a short turn. 
> Our external developer work on different features that will be merged into repo1
> from time to time. 
> 
> Usually during development, we sometimes need to push features from repo1 to
> repo2, and later the features developed on repo2 will be pushed back to repo1, 
> And also smaller bug fixes come from repo2 that needs to go into repo1. 
> 
> But this is a constant process, meaning, that both branches will exist,
> especially repo2 will exist after this feature has finished for smaller
> updates/bugfixes. 
> We don’t want to do a new branch for each bugfix, for each new small feature,
> but have different branches for different developer teams. 
> 
> So I was wondering, if this could cause troubles with GIT in case of merging
> around without closing a branch. 
> 

Git doesn't take away merge conflicts, but it does make it (a LOT) easier to
handle them when they appear, for the reasons stated above. What you want to
do sounds pretty reasonable, although I'd personally use feature-branches
for both internal and external developers, since they make it possible to
pick which features and fixes you want to release while allowing developers
to make as many commits as they feel is necessary for each feature.

> I am adding an link to an image that might show what I tried to explain. 
> http://temp.in.futureweb.at/parallell-development.png
> 

We're quite fond of ascii-art here on git@vger. Since I don't know what the
different colors mean in the picture, ascii would probably have made more
sense (since I then could have commented on it).

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

  reply	other threads:[~2009-06-28 17:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-25  9:52 Parallell Development / Switching to GIT Patrick Neuner
2009-06-25 10:11 ` Andreas Ericsson
2009-06-28 17:51   ` Patrick Neuner - Futureweb.at [this message]
2009-06-28 18:47     ` Jeff King
2009-06-28 20:08       ` AW: " Patrick Neuner - Futureweb.at
2009-06-28 22:33         ` David Aguilar
2009-06-29  8:35         ` AW: " Andreas Ericsson
2009-06-29 16:37           ` Peter Harris
2009-07-02  0:47           ` AW: " Patrick Neuner - Futureweb.at
2009-07-02  6:20             ` Johannes Sixt
2009-07-02 11:44               ` AW: " Patrick Neuner - Futureweb.at
2009-07-02 11:55                 ` Johannes Sixt
2009-06-30  5:32         ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B81058949321C8439B9D742F5F8D8FCA01A75C1D@hpserver.intranet.local \
    --to=neuner@futureweb.at \
    --cc=ae@op5.se \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).