mirror of
https://github.com/tiimgreen/github-cheat-sheet.git
synced 2025-08-13 19:34:00 +02:00
Stripspace
This commit is contained in:
16
README.md
16
README.md
@@ -36,6 +36,7 @@ A collection of cool hidden and not so hidden features of Git and GitHub. This c
|
|||||||
- [GitHub Talks](#github-talks)
|
- [GitHub Talks](#github-talks)
|
||||||
- [Git](#git)
|
- [Git](#git)
|
||||||
- [Previous Branch](#previous-branch)
|
- [Previous Branch](#previous-branch)
|
||||||
|
- [Stripspace](#stripspace)
|
||||||
- [Checking out Pull Requests](#checking-out-pull-requests)
|
- [Checking out Pull Requests](#checking-out-pull-requests)
|
||||||
- [Empty Commits :trollface:](#empty-commits-trollface)
|
- [Empty Commits :trollface:](#empty-commits-trollface)
|
||||||
- [Styled Git Status](#styled-git-status)
|
- [Styled Git Status](#styled-git-status)
|
||||||
@@ -457,6 +458,21 @@ $ git checkout -
|
|||||||
|
|
||||||
[*Read more about Git branching.*](http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging)
|
[*Read more about Git branching.*](http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging)
|
||||||
|
|
||||||
|
### Stripspace
|
||||||
|
|
||||||
|
Git Stripspace:
|
||||||
|
|
||||||
|
- Strips trailing whitespace
|
||||||
|
- Collapses newlines
|
||||||
|
- Adds newline to end of file
|
||||||
|
|
||||||
|
A file must be passed when calling the command, e.g.:
|
||||||
|
```bash
|
||||||
|
$ git stripspace < README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
[*Read more about the Git `stripspace` command.*](https://www.kernel.org/pub/software/scm/git/docs/git-stripspace.html)
|
||||||
|
|
||||||
### Checking out Pull Requests
|
### Checking out Pull Requests
|
||||||
If you want to check out pull request locally, you can fetch it using that command:
|
If you want to check out pull request locally, you can fetch it using that command:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user