Cannot checkout/merge files that have been ignored

Multi tool use
Cannot checkout/merge files that have been ignored
We have had this line in the .gitignore
: plugins/third-party/
. But the extension was buggy and we needed to add it to the repo later in the process. So we removed that line added everything and pushed it within the dev
branch.
.gitignore
plugins/third-party/
dev
Right now I am on a feature branch and doing a $ git pull origin dev
or $ git merge origin dev
just doesn't checkout the newly added files. Checking out the dev branch shows that they are there and in the repo.
$ git pull origin dev
$ git merge origin dev
I guess that is because the files have been ignored in the past, but what can I do to come around that?
.gitignore
YES, that's the case…
– philipp
Jul 3 at 8:05
If you really added the files then I don't see how they could not be there in the
dev
branch. As for other branches, merge operations, etc., this might be another story.– Tim Biegeleisen
Jul 3 at 8:07
dev
To make that clear: The files are in the dev branch, but I cannot pull/merge them in the feature branch.
– philipp
Jul 3 at 8:25
After the merge, what does
.gitignore
look like? Does it reflect your having re-added the files?– Tim Biegeleisen
Jul 3 at 8:27
.gitignore
1 Answer
1
There's a couple of things you can try:
third-party
.gitignore
pull
merge
rebase
git rebase dev
third-party
cherry-pick
git cherry-pick c20299d09e9
c20299d09e9
I hope one of those options work for you.
The first option is a good suggestion; not sure if 2 or 3 would do much.
– Tim Biegeleisen
Jul 3 at 8:28
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Well was this feature branch created before you made the changes to
.gitignore
?– Tim Biegeleisen
Jul 3 at 8:00