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

猜你喜欢

转载自www.cnblogs.com/toov5/p/9820332.html