I know this is a noob question but still, how to use git branches?.
To edit a branch in our local repo we have to edit the files in the local folder also. So how to use another branch without editing the files in the project. Instead I want to edit it without changing the project folder. Such as when we use Github we can edit files only in one branch without changing the project folder i.e master branch. But in git we have to edit the files in our directory and then we have to commit to a branch. But the file will become changed in our local directory. I hope you understood what I meant.
Please do explain in simple terms and in detail.