Quantcast
Channel: W3LC - World Wide Web Learners Consortium
Viewing all articles
Browse latest Browse all 108

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

$
0
0

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 :


Viewing all articles
Browse latest Browse all 108

Trending Articles