Skip to content

Commit 328e594

Browse files
committed
Merge pull request #21 from ejmr/tips-from-my-personal-aliases
Three tips adapted from personal aliases which I use
2 parents aa62766 + 197d23a commit 328e594

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@
1919
* [Delete local branch](https://github.com/git-tips/tips#delete-local-branch)
2020
* [Delete remote branch](https://github.com/git-tips/tips#delete-remote-branch)
2121
* [Undo local changes with the last content in head](https://github.com/git-tips/tips#undo-local-changes-with-the-last-content-in-head)
22+
* [Reword the previous commit message](https://github.com/git-tips/tips#reword-the-previous-commit-message)
2223
* [Changing a remote's URL](https://github.com/git-tips/tips#changing-a-remotes-url)
2324
* [Get list of all remote references](https://github.com/git-tips/tips#get-list-of-all-remote-references)
2425
* [Get list of all local and remote branches](https://github.com/git-tips/tips#get-list-of-all-local-and-remote-branches)
2526
* [Get only remote branches](https://github.com/git-tips/tips#get-only-remote-branches)
2627
* [Stage parts of a changed file, instead of the entire file](https://github.com/git-tips/tips#stage-parts-of-a-changed-file-instead-of-the-entire-file)
2728
* [Get git bash completion](https://github.com/git-tips/tips#get-git-bash-completion)
2829
* [What changed since two weeks?](https://github.com/git-tips/tips#what-changed-since-two-weeks)
30+
* [See all commits made since forking from master](https://github.com/git-tips/tips#see-all-commits-made-since-forking-from-master)
2931
* [Pick commits across branches using cherry-pick](https://github.com/git-tips/tips#pick-commits-across-branches-using-cherry-pick)
3032
* [Find out branches containing commit-hash](https://github.com/git-tips/tips#find-out-branches-containing-commit-hash)
3133
* [Git Aliases](https://github.com/git-tips/tips#git-aliases)
@@ -36,6 +38,7 @@
3638
* [Delete all stored stashes](https://github.com/git-tips/tips#delete-all-stored-stashes)
3739
* [Show all tracked files](https://github.com/git-tips/tips#show-all-tracked-files)
3840
* [Show all untracked files](https://github.com/git-tips/tips#show-all-untracked-files)
41+
* [Show all ignored files](https://github.com/git-tips/tips#show-all-ignored-files)
3942

4043
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
4144
<!-- @doxie.inject end toc -->
@@ -129,6 +132,11 @@ git push origin :<remote_branchname>
129132
git checkout -- <file_name>
130133
```
131134

135+
## Reword the previous commit message
136+
```sh
137+
git commit -v --amend
138+
```
139+
132140
## Changing a remote's URL
133141
```sh
134142
git remote set-url origin <URL>
@@ -170,6 +178,11 @@ curl http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completio
170178
git whatchanged --since='2 weeks ago'
171179
```
172180

181+
## See all commits made since forking from master
182+
```sh
183+
git log --no-merges --stat --reverse master..
184+
```
185+
173186
## Pick commits across branches using cherry-pick
174187
```sh
175188
git checkout <branch-name> && cherry-pick <commit-ish>
@@ -239,5 +252,10 @@ git ls-files -t
239252
git ls-files --others
240253
```
241254

255+
## Show all ignored files
256+
```sh
257+
git ls-files --others -i --exclude-standard
258+
```
259+
242260
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
243261
<!-- @doxie.inject end -->

tips.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
"title": "Undo local changes with the last content in head",
6565
"tip": "git checkout -- <file_name>"
6666
},
67+
{
68+
"title": "Reword the previous commit message",
69+
"tip": "git commit -v --amend"
70+
},
6771
{
6872
"title": "Changing a remote's URL",
6973
"tip": "git remote set-url origin <URL>"
@@ -93,6 +97,10 @@
9397
"title": "What changed since two weeks?",
9498
"tip": "git whatchanged --since='2 weeks ago'"
9599
},
100+
{
101+
"title": "See all commits made since forking from master",
102+
"tip": "git log --no-merges --stat --reverse master.."
103+
},
96104
{
97105
"title": "Pick commits across branches using cherry-pick",
98106
"tip": "git checkout <branch-name> && cherry-pick <commit-ish>"
@@ -135,5 +143,9 @@
135143
{
136144
"title":"Show all untracked files",
137145
"tip":"git ls-files --others"
146+
},
147+
{
148+
"title": "Show all ignored files",
149+
"tip": "git ls-files --others -i --exclude-standard"
138150
}
139151
]

0 commit comments

Comments
 (0)