0

I am wondering how to achieve my goal, I want to create a new branch from the master directory, but the directory is autogenerated and it is not checked in.

I want my release branch contains only the final binaries.

Thiis the tree of my master:

$ (master):
        |------>FolderA
        |------>FolderB
        |------>bin  <----- This is autogenerated directory not checkedin

What I want to achieve: new release branch has only bin folder

$(release_branch):
        |------>bin

I tried two methods to do but I'm not able to.

Method 1

I tried to used git subtree:

$git subtree split --prefix=baking/bin/ -b split_libs

No new revisions were found.

I know why I got this error because my autogenerated directory is not checked-in.

Method 2: Split the directory bin into new branch but I wasn't able to do it.

$git filter-branch --prune-empty --subdirectory-filter baking/bin/ test_release

Question: Is it really possible to create a branch from the auto-generated directory which contains only libs?

danglingpointer
  • 4,708
  • 3
  • 24
  • 42
  • Why would you want this? Compiling your project into `bin/` should be possible from your sources, so no need to check it in. And tracking binary data is not what Git was designed for. – Nils Werner Mar 13 '17 at 11:29
  • We have three teams who is depended on my binaries, so I m not happy in spending time, manually uploading my binaries to each of their severs. Instead they can fetch the binaries from latest git release branch. I thought if I push my git release branch to origin then it will be lot of release branch and it consume more space. Because of that I thought I ll just push only the binaries to remote. – danglingpointer Mar 13 '17 at 11:32
  • maybe you can create an other repo for binairies ? – baddger964 Mar 13 '17 at 11:58
  • that is inevitable, creating another repo just for release for my case. I was wondering does git has any feature. Right now that is the only option, I have to create new repo. – danglingpointer Mar 13 '17 at 12:17

1 Answers1

0

This is not the real solution, but I just pushed the entire directory in my release branch so that other teams will fetch libraries from bin dir.

danglingpointer
  • 4,708
  • 3
  • 24
  • 42