[git-users] Change branch creation point of a topic branch after it has been created?

2014-04-08 Thread Alex Rodrigues
I have a git repository with a master branch and a topic branch (created at 
master'B) and the topic branch has received some merges from master. 

A - B - D - F - H- master branch
 \   \ 
  C - E - G  - topic branch
  
Is it possible to changed the point on master at which the topic branch was 
created from master'B to master'F? 

-- 
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] Looking for suggestions on git workflows

2014-04-08 Thread Alex Rodrigues
Like some other folks here, I am relatively new to git and am trying to 
figure out a good workflow for our development team, and appreciate any 
thoughts  suggestions.

We have several project teams that require to work in isolation on their 
respective branches. (a project here consists of a set of related 
features). These project branches may be created at different times and 
therefore may be created from different point on the master. At the time 
the project branches are created, we do not know the release note, nor 
which other projects may be released along with it. Builds occur from the 
individual project branches and code is tested in independent environments 
for each.

A month or two down the line, the management and business teams decide that 
some projects need to be released on a specific date and we then scramble 
to merge those projects together into an integration branch from where the 
build would occur and subsequently deployed to an integrated environment 
for further testing. Developers continue to modify code on their individual 
project branches and frequently merge to the integration branch.

   x - x - x - x - x - x- 
integration branch branch
  x - x - x   / - project B branch
 /   /
x - x - x - x - x - x - x - x - x - x - x - x - x - x - x - master branch
 \   \
  x - x - x   \ - project A branch
   x - x - x - project C branch
   

An issue we frequently face is that a project may need to be pulled out of 
the release after it has already been merged into the integration branch 
several times. In our currently SCM tool, this is very painful. We normally 
resort to creating a new integration branch and merging the remaining 
project branches to it, thereby requiring that developers re-resolve all 
the conflicts they had already resolved previously on the original 
integration branch, a task which is not only very painful but very time 
consuming as it is equivalent ot a big bang merge far into the project 
schedule, and often delays the project release due to all the additional 
work.

Some things we have or are considering to help ease the pain:

   1. Implementing feature toggles - This is being discussed with the 
   development managers but the initial though is that it may be very tough to 
   implement with the way the code has been structured today. However, this is 
   still being pursued
   2. Use of the BPF workflow (See links below) and git rerere - This is 
   what I am leaning towards. However the workflow and the tools developed 
   assume that all feature/project branches that are part of a single release 
the integration branch for that release are all branched from the same 
   point on master, which is not the case in our environment
   

*Blogs/articles discussing the BPF (Branch-By-Feature) workflow*

   - http://dymitruk.com/blog/2012/02/05/branch-per-feature/
   - 
   
http://www.acquia.com/blog/pragmatic-guide-branch-feature-git-branching-strategy
   - 
   
http://www.ivoverberk.nl/blog/2013/11/08/git-workflow-automated-branch-per-feature/
   

-- 
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] Change branch creation point of a topic branch after it has been created?

2014-04-08 Thread Alex Rodrigues


 for *git rebase temp-branch*, did you actually mean #Reapply your 
 commits *from* your temp branch?

 Someone in my org just suggested the same kind of solution, so am 
 definitely going to explore that option. But as you rightly mentioned, a 
 rebase can be dangerous and might be so in this case since the project and 
 integration branches are shared.

 What are my options if I do want to proceed with the rebase? Advise all 
 developers to commit their work to the topic branch, then carry out the 
 rebase as you suggested and ask them to do a fetch/pull into their local 
 repositories? if yes, what kind of issues can they expect to run into?
  

-- 
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] How do I find the branch of each parent of a merge commit?

2014-04-01 Thread Alex Rodrigues
Thanks . wanted to make sure there was not already some simple command 
to get what I wanted, and it appears there isn't. Thanks for the links, 
seems to be some promising leads there which help me get to where I want to 
go.

-- 
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] How do I find the branch of each parent of a merge commit?

2014-04-01 Thread Alex Rodrigues
Also found 
http://stackoverflow.com/questions/2706797/finding-what-branch-a-commit-came-from

the following command appears to be exactly what I need

git reflog show --all | grep SHA1 


Now I would need to just parse out the branch name :-)


-- 
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] How do I find the branch of each parent of a merge commit?

2014-03-31 Thread Alex Rodrigues
Perhaps I should explain what I am trying to do.

We have several project branches where developers commit their code (A 
project is a set of related features). The project branches are 
frequently merged to an integration branch where the code is compiled and 
then deployed from. (1 integration branch is created per release)

If a project is pulled from the release and there is no way to simply 
disable it's code, we need to remove that code from the integration 
branch. Since removing code is a tedious process, we normally end up 
creating a new integration view and re-merging the remaining project 
branches to it which is a lot of re-work and time-consuming, thereby 
causing the project schedule to take a hit.

GIT has a feature called rerere that records the conflict resolutions in 
a cache so that it can be later replayed. A few folks have written some 
scripts that make use of git rerere and several low level git commands to 
create a new integration branch and re-merge the remaining project branches 
to it (see links below) which is a pretty neat idea. However, if the script 
encounters a merge that came from a tag on a project branch it does not 
correctly exclude it, probably because the exclude parameter passed to 
the script accepts a branch name but the script uses git name-rev (on 
each of the parent's SHASUMs) to find out the name of the branch which 
returns the tag name instead of the branch where the tag was used to merged 
from.

I need to find a way to make this work (i.e. pass project branch name to 
the script's --exclude parameter and rely on the script to exclude merged 
from it to the new integration branch.

http://www.ivoverberk.nl/blog/2013/11/08/git-workflow-automated-branch-per-feature/
http://www.acquia.com/blog/pragmatic-guide-branch-feature-git-branching-strategy

As you may be able to tell, I am fairly new to GIT and haven't played 
around it for long, so some of my assumptions may be incorrect. Feel free 
to point them out.



-- 
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] How do I find the branch of each parent of a merge commit?

2014-03-28 Thread Alex Rodrigues
I would like to find the branches that contributed to a commit that was the 
result of a merge. If I am able to find the SHASUM of each of the versions 
that contributed to the merge (i.e. the parents), how can I get the branch 
of each of the parents? Note that the merge could have been done from the 
branch or from a tag on the branch.

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