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

Do not delete a changelog if mob start-ing with included changes on origin-less branch #320

Open
LifeofMichal opened this issue Sep 27, 2022 · 2 comments

Comments

@LifeofMichal
Copy link

If I make a branch and by occasional accident I forget to initially push it, I would like this #"#€"€ tool to please not entirely NUKE my changelog without a history trace (yes, without a history trace) and just tell me "You knobhead, push your branch first".

I cannot be the only person this happened to.

@LifeofMichal LifeofMichal changed the title Do not delete a changelog if mob start on origin-less branch Do not delete a changelog if mob start-ing with included changes on origin-less branch Sep 27, 2022
@hollesse
Copy link
Member

Hi Michal, which version of mob do you use? I tried to reproduce this issue as followed, but mob already tells you that the origin branch is missing:

➜  test-project git:(main) git checkout -b test
Switched to a new branch 'test'
➜  test-project git:(test) echo "1" > test
➜  test-project git:(test) git add test            
➜  test-project git:(test) git commit -am "commit1"
[test f9eb988] commit1
 1 file changed, 1 insertion(+)
 create mode 100644 test
➜  test-project git:(test) echo "2" > test
➜  test-project git:(test) mob s -i
  git fetch origin --prune
ERROR Remote branch origin/test is missing
👉 To set the upstream branch, use

  git push origin test --set-upstream

@gregorriegler
Copy link
Collaborator

Hi @LifeofMichal, I'm sorry this happened to you. I hope you didn't loose too much changes.
Did you try recovering it via reflog?

Also, your feedback to @hollesse question would help us improve the experience for all users.

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

3 participants