現(xiàn)在github上建立同名字文件夾
本地文件夾中 git init 將該文件夾設(shè)置為Git倉庫
然后git add filename git commit -m "description"
鏈接遠(yuǎn)程倉庫git@github.com:FirelightXu/spider_meizidemo.git
推送到遠(yuǎn)程倉庫 git push -u origin master
這里有個問題(git新手我也搞不懂是些什么,報的錯都是英語也不想看)
To github.com:FirelightXu/spider_meizidemo
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:FirelightXu/spider_meizidemo'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
反正大概的問題就是遠(yuǎn)程倉庫中有文件不能直接推上去
解決辦法1:
git fetch
git merge
先是把遠(yuǎn)程的fetch下來,再merge(麻煩死了,下次新建的時候不添加readme文件了)
解決辦法2:
git push -u origin master 強(qiáng)推吧,反正沒什么重要東西
下次添加了新的文件,直接git push originmaster
大概是這樣?????
PS:github 怎么刪倉庫,打開倉庫有個setting 進(jìn)去delete就可以啦??