A branch is just a pointer
There is no magic box of branches. A branch is a small label that points at a commit. main just points at your latest commit on the main line, and feature-login points at the latest commit you made on that branch. Creating or moving a branch only moves the label, the commits already exist.