2018年5月24日 星期四

Git 舊資料 push 到 新的IP or repository

Git 舊資料發生問題:
git push origin --delete WW_App

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is

解法:  ssh-keygen -R 10.10.10.10

Git 舊資料 push 到 新的IP or repository:

改repo位置
git remote set-url origin alex_lin@10.8.70.22:/data/git/Demo_app

確認成功與否
git remote -v

使用TotoriseGit or Git bash ,創造新的branch ,再切換到該branch

只需再push 上傳到git server(不需commit) ,因為push 可將 commit log 紀錄帶上去






沒有留言:

張貼留言