Rename the old branch locally: git branch -m oldBranch newBranch Delete the old branch remotely: git push origin :oldBranch Push up the new branch, and make the local branch track with the new remote branch: git push –set-upstream origin newBranch
mysql--batch-uroot-p-e"create database yourDataBaseBackup; SELECT CONCAT('RENAME TABLE ',table_schema,'.',table_name,' TO ','yourDataBaseBackup.',table_name,';') FROM information_schema.TABLES WHERE table_schema LIKE 'yourDataBase';">backup.sql