mirror of
https://github.com/namibia/tips.git
synced 2024-11-15 17:47:12 +00:00
Merge pull request #39 from ejmr/help-and-rebase-tips
Help and rebase tips
This commit is contained in:
commit
c4f2cbbc44
12
README.md
12
README.md
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
<!-- @doxie.inject start toc -->
|
<!-- @doxie.inject start toc -->
|
||||||
<!-- Don’t remove or change the comment above – that can break automatic updates. -->
|
<!-- Don’t remove or change the comment above – that can break automatic updates. -->
|
||||||
|
* [Everyday Git in twenty commands or so](https://github.com/git-tips/tips#everyday-git-in-twenty-commands-or-so)
|
||||||
* [Overwrite pull](https://github.com/git-tips/tips#overwrite-pull)
|
* [Overwrite pull](https://github.com/git-tips/tips#overwrite-pull)
|
||||||
* [List of all files till a commit](https://github.com/git-tips/tips#list-of-all-files-till-a-commit)
|
* [List of all files till a commit](https://github.com/git-tips/tips#list-of-all-files-till-a-commit)
|
||||||
* [Git reset first commit](https://github.com/git-tips/tips#git-reset-first-commit)
|
* [Git reset first commit](https://github.com/git-tips/tips#git-reset-first-commit)
|
||||||
@ -63,6 +64,7 @@
|
|||||||
* [Import from a bundle](https://github.com/git-tips/tips#import-from-a-bundle)
|
* [Import from a bundle](https://github.com/git-tips/tips#import-from-a-bundle)
|
||||||
* [Get the name of current branch.](https://github.com/git-tips/tips#get-the-name-of-current-branch)
|
* [Get the name of current branch.](https://github.com/git-tips/tips#get-the-name-of-current-branch)
|
||||||
* [Ignore one file on commit (e.g. Changelog).](https://github.com/git-tips/tips#ignore-one-file-on-commit-eg-changelog)
|
* [Ignore one file on commit (e.g. Changelog).](https://github.com/git-tips/tips#ignore-one-file-on-commit-eg-changelog)
|
||||||
|
* [Stash changes before rebasing](https://github.com/git-tips/tips#stash-changes-before-rebasing)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end toc -->
|
<!-- @doxie.inject end toc -->
|
||||||
@ -70,6 +72,11 @@
|
|||||||
|
|
||||||
<!-- @doxie.inject start -->
|
<!-- @doxie.inject start -->
|
||||||
<!-- Don’t remove or change the comment above – that can break automatic updates. -->
|
<!-- Don’t remove or change the comment above – that can break automatic updates. -->
|
||||||
|
## Everyday Git in twenty commands or so
|
||||||
|
```sh
|
||||||
|
git help everyday
|
||||||
|
```
|
||||||
|
|
||||||
## Overwrite pull
|
## Overwrite pull
|
||||||
```sh
|
```sh
|
||||||
git fetch --all && git reset --hard origin/master
|
git fetch --all && git reset --hard origin/master
|
||||||
@ -443,5 +450,10 @@ git rev-parse --abbrev-ref HEAD
|
|||||||
git update-index --assume-unchanged Changelog; git commit -a; git update-index --no-assume-unchanged Changelog
|
git update-index --assume-unchanged Changelog; git commit -a; git update-index --no-assume-unchanged Changelog
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Stash changes before rebasing
|
||||||
|
```sh
|
||||||
|
git rebase --autostash
|
||||||
|
```
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end -->
|
<!-- @doxie.inject end -->
|
||||||
|
10
tips.json
10
tips.json
@ -1,4 +1,8 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"title": "Everyday Git in twenty commands or so",
|
||||||
|
"tip": "git help everyday"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"title": "Overwrite pull",
|
"title": "Overwrite pull",
|
||||||
"tip": "git fetch --all && git reset --hard origin/master"
|
"tip": "git fetch --all && git reset --hard origin/master"
|
||||||
@ -241,7 +245,7 @@
|
|||||||
"tip": "git bundle create <file> <branch-name>"
|
"tip": "git bundle create <file> <branch-name>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Import form a bundle",
|
"title": "Import from a bundle",
|
||||||
"tip": "git clone repo.bundle <repo-dir> -b <branch-name>"
|
"tip": "git clone repo.bundle <repo-dir> -b <branch-name>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -251,5 +255,9 @@
|
|||||||
{
|
{
|
||||||
"title": "Ignore one file on commit (e.g. Changelog).",
|
"title": "Ignore one file on commit (e.g. Changelog).",
|
||||||
"tip": "git update-index --assume-unchanged Changelog; git commit -a; git update-index --no-assume-unchanged Changelog"
|
"tip": "git update-index --assume-unchanged Changelog; git commit -a; git update-index --no-assume-unchanged Changelog"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Stash changes before rebasing",
|
||||||
|
"tip": "git rebase --autostash"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user