創(chuàng)建 git 倉(cāng)庫(kù):
mkdir #項(xiàng)目文件夾#
cd #項(xiàng)目文件夾#
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://git.oschina.net/Nsir/項(xiàng)目名.git
執(zhí)行命令:git pull origin master
該命令是先把github上的文件拉下來(lái)尊浪,注意在每次提交之前要首先進(jìn)行pull,這是防止沖突。
git push -u origin master
*** git checkout 也可以直接 reset ***
使用Git進(jìn)行項(xiàng)目存儲(chǔ)
使用git pull時(shí)第美,項(xiàng)目沒(méi)有更新?
Git遠(yuǎn)程操作詳解- 阮一峰的網(wǎng)絡(luò)日志
Git 查看提交歷史
版本回退
廖雪峰的Git教程--很不錯(cuò)
Paste_Image.png
Paste_Image.png
image.png