Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggest adding --index to stash snapshot #83

Merged
merged 1 commit into from
May 31, 2022
Merged

suggest adding --index to stash snapshot #83

merged 1 commit into from
May 31, 2022

Conversation

mattneub
Copy link
Contributor

This PR suggests adding --index to the git apply command
that ends the git snapshot alias.

The reason is that otherwise, although, as you rightly say,
the working tree is restored so that it seems nothing has changed,
the index is destroyed.

But this way, there is no change in either the working tree
or the index, so it truly appears that the snapshot was taken
with no visible effect of any kind.

This PR suggests adding `--index` to the `git apply` command
that ends the `git snapshot` alias.

The reason is that otherwise, although, as you rightly say,
the working tree is restored so that it seems nothing has changed,
the index is destroyed.

But this way, there is no change in either the working tree
or the index, so it truly appears that the snapshot was taken
with _no_ visible effect of _any_ kind.
@joelparkerhenderson joelparkerhenderson merged commit 3bb75d8 into GitAlias:main May 31, 2022
@joelparkerhenderson
Copy link
Member

Great point, thank you!

@mattneub mattneub deleted the add-index-to-stash-snapshot branch May 31, 2022 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants