Git: reset other branch to current without a checkout -


I am writing some scripts for my Git workflow.

I present the other (existing) one branch at present, without checkout.

Previously:

  Current Branch: Comment Other Branch: committed B  

After: / P>

 < Code> Current Branch: Comment A Other Banc: Commit A  

Equivalent

  $ git Checkout otherbranch $ git reset --soft Current branch $ git checkout currentbranch < / Code> 

(Note - Soft: I do not want to affect the working tree.)

Is this possible?

The workflows you describe are not equivalent: when you reset --hard If you do, you lose all the changes work tree (you want to make it reset --soft ).


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -