Create new branch without losing changes Code Example
create new branch without losing changes
git checkout -b new_branch_name
create new branch without losing changes
Creating a new branch ( git checkout -b newbranch ) is always considered "safe": no files will be added, removed, or altered in the work-tree as part of this process, and the index/staging-area is also untouched.