git 命令

53 阅读1分钟

创建名为:branch name的分支:

 git branch (branch name)

删除本地分支:

 git branch -d (branch name)

切换到(branch name)分支:

 git checkout (branch name)

列出分支:

 git branch

所有代码提交到暂存区:

 git add .

确认所有代码(note是确认时候填写的备注信息):

 git commit -m "note"

将代码推送到远程仓库:

 git push -u origin (branch name):(branch name)

绑定远程仓库:

 git remote add origin (repo addr)

\