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

git sync reset --hard? #909

Open
dalehhirt opened this issue Mar 8, 2021 · 3 comments
Open

git sync reset --hard? #909

dalehhirt opened this issue Mar 8, 2021 · 3 comments

Comments

@dalehhirt
Copy link

My definition of sync is

  • Pull latest commits
  • Push latest commits

Why does it also do a hard reset?

@spacewander
Copy link
Collaborator

To ensure all the states are synced (not just the commits).

@dalehhirt
Copy link
Author

dalehhirt commented Mar 11, 2021

So that spawns 3 more questions:

  1. Why does the "soft" reset as well? Shouldn't it only do a fetch, and not a reset?
  2. Why do neither do a push? A sync would seem to indicate that we send our commits up as well as pull down?
  3. why not stash any current changes as to avoid a merge conflict?

@spacewander
Copy link
Collaborator

The script is written 5 years ago. I know its purpose, but I can't recall why the author chose A but not B.

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

No branches or pull requests

2 participants