What's the git command to pull in all changes from a remote repo? -
i have repo that's forked remote repository. made changes, remote repository updated , want pull in changes remote repository, , not care in local repository. i've been deleting local repository, doing simple fork , clone. there's got better way this. what's magic command?
if understand correctly, want throw away commits on local branch (if you've made any). if that's case, want:
# fetch updated branch(es) origin git fetch origin # reset, including work tree, origin's master branch # make sure have master branch checked out first! # , don't mind throwing away local commits or # uncommitted modifications git reset --hard origin/master
Comments
Post a Comment