top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

GIT command to get all branches I've merged into develop since a given date?

0 votes

I need to provide a list of all branches I have merged into develop since a given date.
Can you recommend a git command that will do this?

posted Dec 7, 2016 by Jagan Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes




answer Dec 7, 2016 by Honey
Problem with the approach that you mentioned is that it returns a list of all merges made into develop made by everyone on the team. Not just me.
Similar Questions
+2 votes

I tend to accumulate lots of branches as I'd do one branch per feature. When cleaning up, I'd like to
delete all branches, which have been merged.

I could use

 $ git branch -d (which was merged already?) ^C
 $ git branch --merged # let's find out
 $ # Now run git branch -d with each of the branches.

This kind of question has already been discussed,
suggests: git branch --merged | grep -v "*" | xargs -n 1 git branch -d

I could think of:

 $ git branch -d --merged # no need to specifiy a branch iff --merged is given with -d
 $ git branch --delete-merged # comes as an new extra option, doesn't clutter other commands
 $ git branch -d keyword-for-all-merged-branches

Before starting such a feature, I'd like to hear input of others.

+1 vote

Can git blame show the date that each line was merged to the current branch rather than the date it was committed?

Aside: in some trial and error I notice this oddity:

 $ git blame --merges
 usage: git blame [options] [rev-opts] [rev] [--] file

 [rev-opts] are documented in git-rev-list(1)

 $ git help rev-list | grep -F -e --merges
 [ --merges ]
 --min-parents=2 is the same as --merges.
--max-parents=0 gives all
+1 vote

I have a large Git project which I would like to dissect into subprojects with their own repositories. Git subtrees are ideal for this task: I first

  • create a branch with the contents of only one subfoldergit subtree split -P -b

and then

  • pull this branch into another repository.

For a transitional phase, I would like to have the subprojects read-only and sync them from master. The question is how to organize this. For every commit to master, I could of course perform the above procedure repeatedly for all subprojects, but this seems less then ideal since it does all the work all over again.

Is there a way to merge master into the subtree branches?

+1 vote

At some point I added a large file into a git repository. It now exists on multiple branches, possibly with some changes to it. I'd like to remove it from git, but leave its current form (say the one on the master branch) on the file system.

I tried (on a dummy git archive)

git filter-branch --index-filter 'git rm --cached --ignore-unmatch bigfile' master branch1 branch2

That, however, does not leave a copy of bigfile on the file system.It isn't clear to me why not, though the description of the --tree-filteroption to filter-branch (I'm using the --index-filter option, but is is "similar") states:" (new files are auto-added, disappeared files are auto-removed ... )".
Is there a direct way to do what I want, with git? I've found similar requests;none of the responses point out that the above command actually deletes the file from the file system.

0 votes

I created a dump from a repository. git bundle list-heads prints all the refs I meant to add. The problem is that after extracting the dump with git bundle unbundle the target repository doesn't contain any branches (git branch -a prints nothing). How can we extract a dump so that the branches are also restored?