Git create branch from current checked out master?

First of all moving to a different branch based in the current HEAD is performed like this:

git checkout -b newbranch

Commit all the changes (assuming no newly added files, otherwise git add them):

git commit -a

Go back to the master branch:

git checkout master

The previously uncommitted changes will all be on the newbranch branch, and master will still be at the state it was without those changes.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)