git

实战演练

git config --global user.name "wuxinwudai"
git config --global user.email "1101202419@qq.com"
git config --global credential.helper store
git config --global color.ui true

git config --unset --global user.name #重置用户名配置


mkdir git_test    # 创建文件夹
cd git_test       # 进入文件夹
git init          # 初始化 git 仓库
echo 'Hello Git' > hello_git.txt  # 创建一个文件 hello_git
git add *        # 添加所有文件进入缓冲区
git add -u     
git status       # 查看状态
git chechout -- . # 撤销所有未提交本地的文件的修改
git checkout -- filename # 撤销单个文件的修改
git commit -m 'first commit' --author="wuxinwudai<1101202419@qq.com>"  # 提交到本地分支
git push origin master # 推送到远程分支

git log          # 查看日志
git show xxxx121129abw23
git cat-file xxxx121129abw23
git ls-files --stage
git diff xxxxxxversion1 xxxxxxxversion2

echo 'git rm test' > tmp.txt
git add tmp.txt
git ls-files --stage
git rm -- cached tmp.txt
git ls-files --stage
git add tmp.txt
git mv tmp.txt temp.txt
git remote add origin http://xxx.xx.xx/xx.git
git pull origin master --allow-unrelated-histories
git pull 
git push
git merge
git show-branch
git checkout topic
git rebase master

git rm --cached win.img
git commit --amend
git rebase -i commit-id
git stash
git checkout branch

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值