I created a feature branch from the master
branch, than (did some work and) had to delete many files on this branch. Now, I would like to merge the changes back into master
, but not lose the files on master
that I removed on the feature branch.
Here is, in short, what I did:
(master)> git checkout -b feature
# deleted many files
> git checkout master
> git merge ??? # how to merge back without losing files
In other words, when the file exists on the feature branch, than merge it into master. When the file is removed on the feature branch, don't merge the delete operation on master, but keep the file.
How can I do this?