Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Reset and sync local repository with remote branch

# You may also add as an alias in your .gitconfig file:
alias resetorigin = git fetch origin && git reset --hard origin/master && git clean -f -d
alias resetupstream = git fetch upstream && git reset --hard upstream/master && git clean -f -d

# then type
git resetupstream
# or
git resetorigin
Source by www.ocpsoft.org #
 
PREVIOUS NEXT
Tagged: #Reset #sync #local #repository #remote #branch
ADD COMMENT
Topic
Name
6+4 =