Skip to content

Commit

Permalink
Tip to recover lost commit
Browse files Browse the repository at this point in the history
  • Loading branch information
princejwesley committed Aug 28, 2015
1 parent ca58c81 commit f132bad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
* [rebases 'feature' to 'master' and merges it in to master ](https://github.com/git-tips/tips#rebases-feature-to-master-and-merges-it-in-to-master)
* [Archive the `master` branch](https://github.com/git-tips/tips#archive-the-master-branch)
* [Modify previous commit without modifying the commit message](https://github.com/git-tips/tips#modify-previous-commit-without-modifying-the-commit-message)
* [Purnes branches that have been deleted in the remote.](https://github.com/git-tips/tips#purnes-branches-that-have-been-deleted-in-the-remote)
* [Prunes branches that have been deleted in the remote.](https://github.com/git-tips/tips#prunes-branches-that-have-been-deleted-in-the-remote)
* [Recover lost commits in the local branches or get information about the state of old branches](https://github.com/git-tips/tips#recover-lost-commits-in-the-local-branches-or-get-information-about-the-state-of-old-branches)

<!-- 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 -->
Expand Down Expand Up @@ -372,7 +373,7 @@ git archive master --format=zip --output=master.zip
git add --all && git commit --amend --no-edit
```

## Purnes branches that have been deleted in the remote.
## Prunes branches that have been deleted in the remote.
```sh
git fetch -p
```
Expand All @@ -383,5 +384,10 @@ __Alternatives:__
git remote prune origin
```

## Recover lost commits in the local branches or get information about the state of old branches
```sh
git reflog
```

<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->
6 changes: 5 additions & 1 deletion tips.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,12 @@
"tip": "git add --all && git commit --amend --no-edit"
},
{
"title": "Purnes branches that have been deleted in the remote.",
"title": "Prunes branches that have been deleted in the remote.",
"tip": "git fetch -p",
"alternatives":["git remote prune origin"]
},
{
"title": "Recover lost commits in the local branches or get information about the state of old branches",
"tip": "git reflog"
}
]

0 comments on commit f132bad

Please sign in to comment.