# git_study **Repository Path**: rebeginner/git_study ## Basic Information - **Project Name**: git_study - **Description**: git 和gitee使用 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-08-11 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # git_study #### 项目介绍 git 和gitee使用 1、this is a first time push;     git status-->git add 文件名称/*-->git commit-->git push     2、this is a time pull and push;      git pull-->解决冲突-- git add commit push;     3、this is a time amend commit note      git commit --amend  最后一次      git rebase -i HEAD~3 最近3条       查看了日志,把一行改成edit ,commit --amend修改后,rebase --continue      git git push -f 强制推送      -f 是强制覆盖,会将本地代码覆盖远程代码,要谨慎使用     4、this is a time fallback history record       git log/relog  reset --hard 记录号     5、 this is a new develop    6、find a bug and need create new branch to fix bug       检出分支 git clone -b bug_1.0  https://gitee.com/rebeginner/git_study.git      切换分支  checkout bug_1.0      分支提交  发布新版本     7、 合并此次bug修改分支到主分支master     git merge bug_1.0     git pull  https://gitee.com/rebeginner/git_study.git  bug_1.0     git push origin master     8、git修改远程仓库地址 查看仓库:git remote -v 修改命令:git remote origin set-url [url] 先删后加:git remote rm origin git remote add origin [url] 9、git比较本地仓库和远程仓库的差异 更新本地的远程分支: git fetch origin 本地与远程的差集: git log master..origin/master 统计文件的改动: git diff --stat master origin/master