I have the following situation, and I may know why it is happening but I'm not sure. I think it relates to this thread here. What I want to know is how to avoid it in the future, which I'm guessing maybe can be accomplished with a change in workflow.
I pulled the most recent develop branch then merged in my incomplete feature branch so another developer could access my current changes upon pushing develop back out to the server. When doing the merge, I purposely left out some files that were specific to my feature branch which I didn't want in develop.
Now, let's say there are more changes made to develop that I want in my feature branch. So, I pull those changes into my local develop branch. But, if I rebase my feature branch onto develop (or merge develop into my feature), it removes the files from my feature branch which I omitted initially.
My initial thought is if I had pulled develop and rebased my incomplete feature branch (or merged develop into my feature branch) before merging the feature branch into develop, I could have avoided this issue. Is that the case? If not, directions on how to keep files in a feature branch, while applying develop branch updates to that feature branch would be great.