Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git force sync with remote

#fetch last commit from remote
git fetch origin 
#pipe commands
&&
#force reset
git reset --hard origin/master
#clean repo from untraced file "NOT Recommended"
git clean -f -d
Source by www.ocpsoft.org #
 
PREVIOUS NEXT
Tagged: #git #force #sync #remote
ADD COMMENT
Topic
Name
8+7 =