Re: [git-users] How to automatically merge changes from many branches?

2015-04-02 Thread Philip Oakley

From: Peng Yu pengyu...@gmail.com

One practice of using git to have one feature per branch.

Let's say a developer has worked on many small features in many
branches. Then he sends one pull request to the central (not
controlled by him) for each feature he has developed. While he is
waiting for all the features be merged into the central repository, he
needs to use all these feature locally.


Isn't the problem here? The long wait is the problem that should be 
addressed. Either that or being given too many short tasks rather than a 
few longe tasks that have a natural size match to the organisational 
wait?


It's no good having Agile developers if the management is still being an 
elephant bathing in the waterfall ;-)




To do so, he may need to merge the changes in these branches to his
local master branch. But this can be tedious when he has many
branches.

Is there a way to somehow setup a branch so whenever something is
committed to the branch, the changes will also be simultaneously
committed to the local master branch? By this way, the develop can
avoid having to merge changes from many branches.

--

Not a Git answer, but ...
--
Philip 


--
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] Second user defined filter on add or checkout

2015-04-02 Thread Uwe Bieling
Hi,

I'm using a filter for rcs-keywords expansion. Now i want to use a second 
filter to clean some data inside the project on the same file. 

Are there any posibilities to run the keywords expansion first and after 
this my filter? I don't want to modify the original keywords-filter, 
because it's not mine and i don't want to get troubles with updates of this 
filter.

Bye,

Uwe

-- 
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] problem merging one repo

2015-04-02 Thread SoaringEagle
Hi,
i have two Git repos, foo.git and bar.git whose working trees look like:

foo.git
   foo1/...
   ...
   foo6/...
  
bar.git
   bar1/...
   bar2/...

As shown above, there are 6 top-level sub-directories, namely foo1, foo2, 
...,  foo6 in foo.git and 2 top-level sub-directories, bar1 and bar2 in 
bar.git.

i tried to merge the 2 repos together by merging the content of bar.git 
into foo.git so the new foo.git will contain all the original top-level 
sub-dirs from both foo.git and bar.git:
   foo1  foo2  foo3  foo4  foo5  foo6  bar1  bar2

Here is what i did:
  
1.  #  in the top-level directory of the cloned foo.git, add the bar repo 
as remote_bar:
git remote add bar_remote barRepoGitURL
git fetch bar_remote

2.  #  merge the bar repo into foo
git merge -s ours --no-commit bar_remote/master

3.  #  read the tree info into the index
git read-tree -m -u bar_remote/master

At this time, i'm surprised to find out the top-level directory contains 
only the 2 sub-dirs of bar.git:
   bar1  bar2
and all the top-level foo[1-6] sub-dirs are gone so i can't proceed with 
commit and push.

Where did i screw up?

Thanks for reading.

-- 
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] Second user defined filter on add or checkout

2015-04-02 Thread Konstantin Khomoutov
On Thu, 2 Apr 2015 03:21:05 -0700 (PDT)
Uwe Bieling a.1.psychi0...@spamgourmet.com wrote:

 I'm using a filter for rcs-keywords expansion. Now i want to use a
 second filter to clean some data inside the project on the same file. 
 
 Are there any posibilities to run the keywords expansion first and
 after this my filter? I don't want to modify the original
 keywords-filter, because it's not mine and i don't want to get
 troubles with updates of this filter.

Create a wrapper script which calls the first printer program and pipes
its output to the second filter program (which has its stdout connected
to that of the script interpreter and then specify the script as a
filter instead of the original one.

In the simplest case, if you have

  *.cfilter=rcs-keywords
  
  [filter rcs-keywords]
  clean = rcs-remove
  smudge = rcs-expand

You could then write a shell script

  #!/bin/sh
  
  set -e -u
  
  usage(fd) {
echo 'Usage: myscript {clean|smudge}'
  }
  
  if [ $# -ne 1 ];
usage 2
exit 1
  fi
  
  case $1 in
clean)
  myfilter -clean | rcs-remove
;;
smudge)
  rcs-expand | myfilter -smudge
;;
help)
  usage
  exit 0
;;
*)
  usage 2
  exit 1
;;
  esac

And then change the definition in .gitattributes:

  *.cfilter=complex
  
  [filter complex]
  clean = ~/bin/complex-git-filter clean
  smudge = ~/bin/complex-git-filter smudge

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