原連接添加鏈接描述https://blog.csdn.net/u013120247/article/details/53263169
Administrator@PC-20131018OHXV /cygdrive/e/dev_root/git/crifanLib
$ git pull --rebase origin master
From https://github.com/crifan/crifanLib
* branch master -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: add local crifanLib to github
可以看到,此時已經把github上最新的文件下載下來了:
即,那個README.md文件。
4.接着再去:
git push origin master
Administrator@PC-20131018OHXV /cygdrive/e/dev_root/git/crifanLib
$ git push origin master
Username for 'https://github.com':
Password for 'https://[email protected]':
Counting objects: 19, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (18/18), 112.33 KiB, done.
Total 18 (delta 0), reused 0 (delta 0)
To https://github.com/crifan/crifanLib.git
6bae951..32d67c7 master -> master
即可成功把本地的文件都上傳到github上面去了。
5.此時再去github網站上也就可以看到對應文件了:
【注意】
此處注意到,此時所用的用戶,是那個當前電腦的名詞,很長的那個,而不是crifan:
那是因爲之前那個:
【已解決】cygwin中用git去config配置用戶名和郵箱出錯:error: cannot run vi: No such file or directory
時,當時沒有解決掉用戶名的問題就去commit了。
所以用戶名是當時的,當前電腦的用戶名。而不是我自己的crifan。
而此時已經解決了修改用戶名的問題。
等下次再去上傳,或許可以把用戶名變過來了。