How to move the changes from one branch to another branch git?

If the changes are not commited.

you can stash the changes in the master branch .

git stash

then checkout the branch

git checkout -b newbranchname

and pop the changes here

git stash pop

If the changes are commited :

then create a branch :

git checkout -b newbranch

checkout back to master branch:

git checkout master

reset to previous commit :

git reset --hard head^1

Leave a Comment

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