常用Git命令解析
git
1 | git init |
查看
1 | git log: --oneline #查看历史记录的简洁的版本 |
配置
1 | git config --global user.name "Freedom Liu" |
版本
1 | git tag |
远程库
1 | git remote -v # 显示所有远程仓库 |
修改
1 | # 不保留本地修改,用远程强制覆盖更新本地分支 |
1 | # 删除远程文件: |
1 | # 追加到最后一次commit |
1 | # 在本地新建一个temp分支,并将远程origin仓库的master分支代码下载到本地temp分支 |
1 | # 修改commit |
1 | # gitlab 上fork别人的代码后,怎样去更新别人的新代码 |
1 | # Checkout locally by modifying .git/config for a given repository |
Patch
1 | patch: |
issues
1 | # error: The following untracked working tree files would be overwritten by checkout: |