So, I'm cloning code from master branch to my local directory. And when i open the code in (INTELLIJ Idea) on lower right side its shows master branch but instead of master branch i want my own branch(Branch i made from master branch) so that i can do changes on code and commit it and the commits only goes to my branch not master branch.
I cloned from master branch and then used git checkout to switch to my branch but then the code also switches to the one i have on my branch instead of master branch.
CodePudding user response:
but then the code also switches to the one I have on my branch instead of
master
branch.
That is expected. Switching to an existing branch will update the working tree to reflect the latest branch commit content.
You could create a new branch from master
instead: that new branch would start from the code from master
.