We're using posh-git on Windows Powershell for source control.
We're in the unenviable position of storing some of our built assemblies in our git repo. I know all the sermons on why you shouldn't do that, but we have to live with it for now. Thankfully they are in a separate solution, but sometimes two people work on that solution in their own branch simultaneously, and the last one in gets to take the merge conflict. The process, of course, looks something like this:
- Person A lands their changes on develop.
- Person B merges those changes, which include both assemblies and
update source code.
- Person B resolves conflicts, as has to confirm which version of each
assembly they want to keep. This is annoying and time-consuming,
and also unnecessary since Person B will rebuild the assembly after
merging the source code anyway.
- Person B rebuilds the assemblies and makes a new commit to finish
the merge.
The assemblies are in a folder in our Repo: /Source/Foundation Assemblies/
Person B cannot just take all changes from the remote, since their branch may have conflicting changes, but it would be helpful to just "take theirs" or "take mine" for the /Source/Foundation Assemblies/ folder only. Is this something that can be done with git?
A command line example would be helpful. Normally, the merge would just be:
git merge develop
I was thinking it might be possible to .gitignore the /Source/Foundation Assemblies/ folder, and then remove it from the .gitignore after the merge, but that is three steps. If we could do it in one from the command line, that would be GREAT!!!
Any help appreciated!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…