learn git

注意空格!
注意空格!!
注意空格!!!

git config --global user.name “”
git config --global user.email “”

mkdir learngit
cd learngit
pwd 查看当前目录

git init

git add
git commit -m""

git status 查看状态
git diff 查看不同
git log 查看提交历史,加入–pretty=online简化参数
git reflog 查看命令历史
git log --graph --pretty=oneline --abbrev-commit

git rm 删除

git clone 远程仓库地址本地从无到有
git pull git fetch+git merge

git remote -v 查看远程库
git remote add origin
git push origin brach-name
git checkout -b branch-name origin/branch-name 在本地创建和远程分支对应的分支
git branch --set-upstream branch-name origin/branch-name 建立本地分支和远程分支的关联

git branch 查看分支
git checkout -b abc *创建并切换,git branch abc ,git checkout abc *
git checkout abc 切换分支
git merge abc合并分支到当前分支
git branch -d abc 删除分支

git stash 储存工作现场
git stash pop 恢复工作现场并删除stash,git stash apply,git stash drop
git stash list

git tag -a tagname -m “” commit id(默认最新commit)
git show tagname
git tag 查看所有标签
git tag -d tagname 删除标签

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值