2013年12月3日 星期二

github error

git push remote branch時出現

這是因為創建repo時選擇了建立readme
此時readme沒有和本機同步
所以必須先和remote同步

sol:
git remote add origin //your github url

//pull those changes

git pull origin master

//now, push your work to your new repo

git push origin master
git pull origin master時 
error: Your local changes to the following files would be overwritten by merge:
index.rtf
必須先commit
git commit -m "index.rtf"
git pull origin master
git push origin master
大功告成!

沒有留言:

張貼留言