(轉(zhuǎn)載)
前期準(zhǔn)備:
老地址:https://gitee.com/fengxiangongye/occupation_campus_front_end
新地址:https://gitee.com/church_experimental_school/portal-vue
1.進(jìn)入git_test根目錄(可以執(zhí)行g(shù)it命令的話羽圃,就證明進(jìn)入了git_test根目錄乌询。)
2.查看項目目前的git地址? ? ? ? ? ? ? ? ? ? ?git remote -v
git remote-v
originhttps://gitee.com/fengxiangongye/occupation_campus_front_end(fetch)
originhttps://gitee.com/fengxiangongye/occupation_campus_front_end(push)
3.重新設(shè)置git的新地址? ? ? ? ? ? ? ? ? ? ? ?git remote set-url originhttps://gitee.com/church_experimental_school/portal-vue
git remote set-url originhttps://gitee.com/church_experimental_school/portal-vue
4.驗證項目目前的git地址git remote -v
git remote-v
originhttps://gitee.com/church_experimental_school/portal-vue(fetch)
originhttps://gitee.com/church_experimental_school/portal-vue(push)
5.將項目上傳到git上
? ? ? ? git push -u origin --all
? ? ? ? git push -u origin --tags完成案疲。但需要注意git分支汽绢,新上傳項目的分支只會保留本地的涩拙,之前的遠(yuǎn)程分支不存在。
或者:使用idea
1.
2.