Skip to content

Commit c4f2cbb

Browse files
committed
Merge pull request #39 from ejmr/help-and-rebase-tips
Help and rebase tips
2 parents 8234cbe + c46f049 commit c4f2cbb

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
<!-- @doxie.inject start toc -->
55
<!-- Don’t remove or change the comment above – that can break automatic updates. -->
6+
* [Everyday Git in twenty commands or so](https://github.com/git-tips/tips#everyday-git-in-twenty-commands-or-so)
67
* [Overwrite pull](https://github.com/git-tips/tips#overwrite-pull)
78
* [List of all files till a commit](https://github.com/git-tips/tips#list-of-all-files-till-a-commit)
89
* [Git reset first commit](https://github.com/git-tips/tips#git-reset-first-commit)
@@ -63,13 +64,19 @@
6364
* [Import from a bundle](https://github.com/git-tips/tips#import-from-a-bundle)
6465
* [Get the name of current branch.](https://github.com/git-tips/tips#get-the-name-of-current-branch)
6566
* [Ignore one file on commit (e.g. Changelog).](https://github.com/git-tips/tips#ignore-one-file-on-commit-eg-changelog)
67+
* [Stash changes before rebasing](https://github.com/git-tips/tips#stash-changes-before-rebasing)
6668

6769
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
6870
<!-- @doxie.inject end toc -->
6971

7072

7173
<!-- @doxie.inject start -->
7274
<!-- Don’t remove or change the comment above – that can break automatic updates. -->
75+
## Everyday Git in twenty commands or so
76+
```sh
77+
git help everyday
78+
```
79+
7380
## Overwrite pull
7481
```sh
7582
git fetch --all && git reset --hard origin/master
@@ -443,5 +450,10 @@ git rev-parse --abbrev-ref HEAD
443450
git update-index --assume-unchanged Changelog; git commit -a; git update-index --no-assume-unchanged Changelog
444451
```
445452

453+
## Stash changes before rebasing
454+
```sh
455+
git rebase --autostash
456+
```
457+
446458
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
447459
<!-- @doxie.inject end -->

tips.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
[
2+
{
3+
"title": "Everyday Git in twenty commands or so",
4+
"tip": "git help everyday"
5+
},
26
{
37
"title": "Overwrite pull",
48
"tip": "git fetch --all && git reset --hard origin/master"
@@ -241,7 +245,7 @@
241245
"tip": "git bundle create <file> <branch-name>"
242246
},
243247
{
244-
"title": "Import form a bundle",
248+
"title": "Import from a bundle",
245249
"tip": "git clone repo.bundle <repo-dir> -b <branch-name>"
246250
},
247251
{
@@ -251,5 +255,9 @@
251255
{
252256
"title": "Ignore one file on commit (e.g. Changelog).",
253257
"tip": "git update-index --assume-unchanged Changelog; git commit -a; git update-index --no-assume-unchanged Changelog"
258+
},
259+
{
260+
"title": "Stash changes before rebasing",
261+
"tip": "git rebase --autostash"
254262
}
255263
]

0 commit comments

Comments
 (0)