赞
踩
github
是代码托管平台。sha1
哈希值) 进行区分。git init --bare
创建一个裸仓库。git clone ...
克隆远程仓库到本地。http
/ https
ssh
ssh
协议是一个验证授权的网络协议。ssh
公钥登录 git
服务器。
ssh-keygen -t rsa
。openssh server
(可省略)。.ssh/authorized_keys
。git clone ssh://root@123.249.112.139:/root/holo_render/remote_storage
git config user.name zcoder
git config user.email zcoder@163.com
git config --global user.name zcoder
git config --global user.email zcoder@163.com
40
位 sha1
哈希值。head
:当前检出记录的符号引用。git add
。git commit
。git push
。git fetch
→ 将远程仓库所包含分支的最新 commit-id
记录到本地文件。git pull
→ git fetch + git merge
。git status
。git log
。git restore -S
。git reset --soft
。git reset --mixed
。null
:git reset --hard
。git commit --amend
→ 相同功能多次提交复用上次提交信息。git rebase -i hash1 hash2
(左开右关)。develop
分支上使用,因为提交的 commit-id
会发生变化。git branch
。git branch develop
→ 创建。git switch develop
→ 切换。git checkout -b develop
→ 创建并切换。git branch -d develop
。master
分支,拉取远程仓库 master
最新数据。git switch master
git pull
develop
分支,把本地 master
合并到 develop
。git switch develop
git merge master
vi api.hpp
git add .
git commit -m "fix:merge master"
master
分支,把 develop
合并到本地 master
,最后提交到远程仓库。git switch master
git merge develop
git push origin master
git merge
。git pull
拉取最新代码。Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。