|
1 | 1 | ## git-tips
|
2 | 2 | > Collection of `git-tips`, want to add your tips? Checkout [contributing.md](./contributing.md)
|
3 | 3 |
|
| 4 | +[English](http://git.io/git-tips) | [中文](https://github.com/521xueweihan/git-tips) |
| 5 | + |
4 | 6 | P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
|
5 | 7 |
|
6 | 8 | <!-- @doxie.inject start toc -->
|
@@ -353,7 +355,7 @@ git branch --contains <commit-ish>
|
353 | 355 |
|
354 | 356 | ## Git Aliases
|
355 | 357 | ```sh
|
356 |
| -git config --global alias.<handle> <command> |
| 358 | +git config --global alias.<handle> <command> |
357 | 359 | git config --global alias.st status
|
358 | 360 | ```
|
359 | 361 |
|
@@ -517,7 +519,7 @@ __Alternatives:__
|
517 | 519 | git branch -m [<old-branch-name>] <new-branch-name>
|
518 | 520 | ```
|
519 | 521 |
|
520 |
| -## rebases 'feature' to 'master' and merges it in to master |
| 522 | +## rebases 'feature' to 'master' and merges it in to master |
521 | 523 | ```sh
|
522 | 524 | git checkout feature && git rebase @{-1} && git checkout @{-2} && git merge @{-1}
|
523 | 525 | ```
|
@@ -798,12 +800,12 @@ git checkout master && git branch --no-merged
|
798 | 800 |
|
799 | 801 | ## Find guilty with binary search
|
800 | 802 | ```sh
|
801 |
| -git bisect start # Search start |
802 |
| -git bisect bad # Set point to bad commit |
803 |
| -git bisect good v2.6.13-rc2 # Set point to good commit|tag |
804 |
| -git bisect bad # Say current state is bad |
805 |
| -git bisect good # Say current state is good |
806 |
| -git bisect reset # Finish search |
| 803 | +git bisect start # Search start |
| 804 | +git bisect bad # Set point to bad commit |
| 805 | +git bisect good v2.6.13-rc2 # Set point to good commit|tag |
| 806 | +git bisect bad # Say current state is bad |
| 807 | +git bisect good # Say current state is good |
| 808 | +git bisect reset # Finish search |
807 | 809 |
|
808 | 810 | ```
|
809 | 811 |
|
|
0 commit comments