Remove all your local git branches, use master instead

git branch | grep -v "master" | xargs git branch -D 

Add remote repository

git remote add remote_name https://github.com/moodle/moodle
//view all remotes
git remote -v

Remove Remote

git remote rm remote_name

Save custom user credential git repositories

git config --global credential.helper 'cache --timeout=3600000000000'

Git ignore for file mode

git config core.fileMode false

How to push branch to remote repository

git push remote_name branchnew:branchnew

Update new repository url

git remote set-url origin https://github.com/moodle/moodle

Reset all changes 

git reset --hard

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.