【Git】远程仓库管理

  • Post author:
  • Post category:其他


从远程仓库


克隆

git clone URL(URL支持git,ssh,http,https等各种协议)


拉取


远程仓库的文件
git pull origin master
(Git默认使用origin 这个名字来标识原始的远程仓库)


添加


文件
git add filename


提交


修改
git commit –m ”注释”


推送


到远程仓库
git push origin master


查看


远程仓库
git remote     只能查看远程仓库的名字
git remote –v     远程仓库的名字及git地址
git remote show [remote-name]    查看单个仓库的信息


新建


远程仓库
git remote add [shortname] [url]


修改


远程仓库
git remote rename [oldname] [newname]


删除


远程仓库
git remote rm [remote-name]



版权声明:本文为Dongle_74原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。