创建分之名:
git checkout -b + 分支名
切换分支:git checkout + 分支名
绑定个人邮箱或者账号:
git config --global user.name 'you name'
git config --global user.email you@example.com
git 常用命令:
生成秘钥:
cd ~/.ssh $ ssh-keygen -t rsa -C "youremail@example.com" cat ~/.ssh/id_rsa.pub
查看tag `git tag` 打轻量tag `git tag tag_name` 打附注标签 `git tag -a tag_name -m message` 删除本地tag `git tag -d tag_name` 删除远程tag `git push origin --delete tag tagname` 提交指定tag `git push origin tag_name` 提交所有tag `git push origin --tags` 从指定tag拉出分支 `git checkout tag_name` 从release拉出新分支,并切到新分支 ``` git checkout release git checkout -b branch_name ``` 删除本地分支 `git branch -d branch_name` 删除远程分支 `git pull origin --delete branch_name` 从A分支merge到B ``` git checkout B git merge A ``` 拉取已提交代码到另一个分支 `git cherry-pick commit-hash-id` 同一台电脑上设置两个ssh-key 参考 https://blog.csdn.net/myNameIssls/article/details/80516577 这个
转载于:https://www.cnblogs.com/wtfu/p/6950120.html
相关资源:数据结构—成绩单生成器