git

基本配置

# 当前项目下配置
git config -l
# 查看全局配置 ~/.gitconfig
git config --global --list
# 查看系统配置  ../git/etc/gitconfig
git config --system --list
# 设置全局用户名,邮箱
git config --global user.name "xxx"

Git

image-20200914121206477

image-20200914121136764

image-20200914121409427

Git创建步骤

git init
git clone
绑定ssh
# 用户家目录 运行即可windows 相同命令
ssh-keygen -t rsa
# 将公钥上传github即可

IDEA使用Git

  • 创建项目
  • 连接远程仓库
    • github创建仓库
    • clone
    • 将仓库复制到项目

Git分支

git reset 撤销上一次 commit
git branch
git branch -r
git branch new_branchname
git checkout -n branch
git merge branch # 指定分支合并到当前,冲突需要手动选择
git branch -d branch # 删除分支
git push origin --delete branch # 删除远程分支
git branch -dr remote/branch

参考:https://static.dean0731.top/pdf/git.pdf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值