1. 程式人生 > >windows下的git使用指令

windows下的git使用指令

經常使用mac和linux

這次使用window開發了一些小專案

廢話不多說:

git init

git add .

git commit -m 'note'

git remote add origin 你的遠端庫地址 比如  git remote add origin https://github.com/nnaa/helloworld.git

如果寫錯了

git remote rm origin //刪除origin
git remote add origin https://github.com/nana/demo.git //重新新增origin

每次要做同步

git pull --rebase origin master

git push -u origin master

強制:

git push -u origin master -f