I suppose it would also be possible for this developer to simply merge his local feature branch with my remote feature branch to get these config files? (this is sort of separate to the main question).
Would this work for the second part of my question?
git fetch remoteBranch
git checkout localBranch
git merge remoteBranch
Doing this, does the localBranch need to have all changes committed first and do they risk losing any of their progress so far? For example, my empty app.js file will not overwrite his app.js file that he's been working on after he does the merge?
Yes, you'd need to create a staging branch that you can both push too to ensure it works before going to main. Your partner could also merge your current branch into his using the commands you listed above. It shouldn't overwrite any of his work, just add yours code to his. If there are conflicts, his code editor should notify him. :)
I suppose it would also be possible for this developer to simply merge his local feature branch with my remote feature branch to get these config files? (this is sort of separate to the main question).
Would this work for the second part of my question?
git fetch remoteBranch
git checkout localBranch
git merge remoteBranch
Doing this, does the localBranch need to have all changes committed first and do they risk losing any of their progress so far? For example, my empty app.js file will not overwrite his app.js file that he's been working on after he does the merge?
Yes, you'd need to create a staging branch that you can both push too to ensure it works before going to main. Your partner could also merge your current branch into his using the commands you listed above. It shouldn't overwrite any of his work, just add yours code to his. If there are conflicts, his code editor should notify him. :)
Awesome!!! Once again, thank you tons Andrea! You’ve pretty much solved our collaboration worries :).
Yay! I'm so glad I could help. :) Best of luck on your project.