Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chenfan0/learn_git
https://github.com/chenfan0/learn_git
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/chenfan0/learn_git
- Owner: chenfan0
- Created: 2022-04-14T07:38:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-26T05:50:38.000Z (over 2 years ago)
- Last Synced: 2024-04-16T14:08:38.320Z (7 months ago)
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Git配置命令
- 配置用户名:git config --global user.name "your name"
- 配置用户邮箱: git config --global user.email "your email"
## Git工作区操作命令
### 提交
- 提交工作区所有文件到暂存区: `git add .`
- 提交工作区中指定文件到暂存区: `git add ...`
- 提交工作区中某个文件夹中所有文件到暂存区: `git add [dir]`
### 撤销
- 撤销commit: `git rm --cached `
## 暂存区上的操作命令
- 修改提交的注释:`git commit --amend`
## rebase和并分支
- git rebase 分支名
- 如果遇到冲突时,先进行冲突的合并,然后执行git add . , 然后执行git rebase --continue