version control - Git branch -f versus soft reset -


does git command:

git branch -f master master^ 

have same effect as:

git reset --soft master^ 

is so?

theoretically yes, practically no. first option not work if master current branch. cannot force-update current branch branch command.

should on branch, not identical either:

  • the first option moves master branch , leaves current branch alone
  • the second option moves current branch 1 before master, , leaves master alone.

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -