git - Add private file (that are not pushed) with a commit, possible? -
i've question because helpful in such cases : i'm working on open-source program, , i'd keep git repo clean, containing source , build related files. however, beside that, wrote scripts relevant me quite linked commit or branch i'm working on.
is there possibility having these files saved commit not pushed on remote repo ?
anyway you're working in separate repo , branch. may commit utility files along corresponding chahges. when prepare commit pull request, make separate release branch, checkout , remove these files in next commit. development branch still have these files in older commits.
when feature ready: create branch , checkout it
git checkout -b pull_request git rm <all utility files> git commit -am'removed utility files'
you can make single commit, keep history tidy. after previous commands:
git reset --soft <sha1 forked branch> git commit -am'implemented feature x'
now branch pull_request contains changes of last commit , not contain utility files in of mid-development commits.
Comments
Post a Comment