Goal: only include generated files on specified branches.
Reasons:
So, in current workflow, main branch is dev, there are two deployment branches: stage and prod.
What I would expect to work is adding
build/*
[branch "stage, prod"]
!build/*
to .gitignore or .git/info/excludes would mean that after I run rake build
on dev branch, build/ does not show changed files when run git status
. On stage and prod branches, build/ would show changed files.
However, all the variations I've tried of the above have not worked.
This seems like pretty typical workflow, is there some git magic I'm missing or how do people deal with this situation?
.gitignore
is a file checked into the repository like any other file. Checkout a branch, change .gitignore
to how you want it for that branch, and commit it. That change will only affect that branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With