I have seen this topic and this one but they don't quite fit my problem.
I have a remote repo with 3 branches (master, branch1, branch2) with many commits on each and I have also a local repo with some files and more recent work.
*I tried to -git init and add my remote to pull from branch1, clean the code then push. That was the idea to have a clean git project and a clean local repo. But it didn't worked. I had only my branch master and no possibility to switch to my branch "branch1".
*I tried also to -git clone my branch1 only. It worked. I got all the files with the last version from my branch1. But i had no .git and my branch1 was considered as my branch master.
*I tried to clone my entire project. But still, my branches do not appear with -git branch.
So I might need a little help to understand the proper way to do it. How do I sync my local repo (with more recent work) properly with my branch1 without losing or erasing my work ?
I also would like avoid conflits or cleaning a mess in the process.
Thank you all in advance for your help !