Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git sync branches

git fetch origin
git reset --hard origin/master
git clean -f -d

#If you want to retain the changes as unstaged files, use --soft instead of --hard.
#WARNING: All your untracked files will be gone when you do git clean -f -d.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #sync #branches
ADD COMMENT
Topic
Name
5+2 =