I need to do a simple thing but I just can't find the right way...
Me and other developer are working with the same GIT branch on a cloud repository. He added some file with code that is not well formatted and committed locally but didn't push to the cloud.
I want to get those files by connecting directly to his .git
folder by using git pull
.
I know that in this stage GIT will create a remote branch for me and a local branch to hold this files.
What I can't understand is:
Can I pull only specific files?
How can I add this files to the main branch I'm working on' edit them and then push them to the server?
BTW: I guess that the right way will be to create a temporary branch, push from my friend machine to it, pull on my machine and then push it to the cloud but in my workplace committing not well formatted code is problematic...