1. For example, there are two branches: dev and myBranch. The content on the two branches is now the same and has been synchronized.
2. Now several files a.txt, b.txt have been deleted on dev; switch to dev locally for pull
3. Then switch to the myBranch branch and merge the dev content into myBranch
1. Are the files on myBranch deleted after the merge?
2. If the myBranch branch is merged into dev, will it be retained?
Since the company’s git cannot be operated casually, I hope someone who knows can help answer it
git checkout myBranch; git merge dev. The result is that the file is deleted in myBranch.
git checkout dev; git merge myBranch. Because the file has been deleted in dev, merging myBranch will not restore the file.
You can’t play casually with the company’s git, so register a github yourself and play casually.
The files after the merge will be saved. You always have a branch with a.txt and b.txt, so they will not be deleted