git

git

学习总结

Posted by 溜大虾 on April 8, 2018
  • 查看远程库名

$ git remote

  • 查看远程库名和对应的地址

$ git remote -v

  • 添加远程库

$ git remote add remotename [URL] 例如git remote add origin http://Liuerr0r/Liuerr0r.github.io

  • 删除库

$ git remote rm remotename

  • 重命名库

$ git remote rename oldname nename

  • 新建分支

$ git branch newbranchname

  • 选择分支

$ git checkout branchname

  • 删除分支

$ git branch rm branchname

  • 同步到本地

$ git pull origin master

  • 推送到远程

$ git push -u origin master

  • 查看当前信息

$ git stutas