My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com









Wednesday, June 24, 2020

Git: How to discard all local commits on branch And making local same as upstream branch

Discarding all local commits on branch


In order to discard all local commits on this branch, to make the local branch identical to the "upstream" of this branch, simply run

git reset --hard @{u}



Hope this answers the question that how to discard all local commits on branch. Or, how to make  local same as upstream branch


Read some of my other posts related to Git tricks below :

No comments:

Post a Comment