title: Git-Remote-Repository
date: 2024-01-28	
status: DONE
tags:
  - Git
  - NOTE
author:
  - AllenYGY
created: 2024-01-28T11:37
updated: 2024-04-08T20:19
publish: TrueGithub
ssh-keygen -t rsa -b 4096
Copy public key

push 推送新内容
git push <remote> <branch>
pull 拉取更新内容
git pull <remote>
git remote add origin [url]
origin 是一个别名 表示远程的仓库
[url] 即为远程仓库的.git
git remote -v
git remote remove <RemoteRepo>
git branch -M xxxx
git push -u <RemoteRepo> <RemoteBranch>:<LocalBranch>
如果远程分支名与本地分支名相同可以省略一个 pull相同
git push -u <RemoteRepo> <LocalBranch>
git pull
git fetch
