Merge pull request #28 from mscottnelson/patch-1

Add reflog, add moving most recent commit
pull/29/head
Igor Chubin 6 years ago committed by GitHub
commit 093ba88083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -174,3 +174,15 @@ git diff-tree --no-commit-id --name-only -r ${commit_id}
# list files changed in ${commit_id}, porcelain way, meant to be user facing
git show --pretty="" --name-only bd61ad98
# See everything you have done, across branches, in a glance,
# then go to the place right before you broke everything
git reflog
git reset HEAD@{hash}
# To move your most recent commit from one branch and stage it on TARGET branch
git reset HEAD~ --soft
git stash
git checkout TARGET
git stash pop
git add .

Loading…
Cancel
Save