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

Check actually prevents from rebasing sometimes #2

Closed
rpitonak opened this issue Oct 23, 2019 · 6 comments
Closed

Check actually prevents from rebasing sometimes #2

rpitonak opened this issue Oct 23, 2019 · 6 comments

Comments

@rpitonak
Copy link

I did some changes locally and git add the changed files. I wanted to do a commit but pre-commit yield that I have to rebase.

But running git pull --rebase upstream master outputs:

error: cannot pull with rebase: Your index contains uncommitted changes.
error: please commit or stash them.

So, I should commit the changes to rebase but I have to rebase to commit the changes?
Alt Text

@rpitonak rpitonak changed the title Check actually prevent from rebasing sometimes Check actually prevents from rebasing sometimes Oct 23, 2019
@lachmanfrantisek
Copy link
Member

Maybe this could help: https://git-scm.com/book/en/v1/Git-Tools-Stashing

@lachmanfrantisek
Copy link
Member

lachmanfrantisek commented Oct 23, 2019

Or skip the check:

env SKIP=check-rebase git commit

@lachmanfrantisek
Copy link
Member

We need to print that advice. What is the prefered way?

  • use the env-var
  • commit with -n
  • stash

@rpitonak
Copy link
Author

I think it is best to use stash because using env var user can avoid to actually rebase after.

@TomasTomecek
Copy link
Member

I'd print all of them - so that people can pick the preferred solution (all of them at once: stash && commit -n with the the env var, force push and run)

@csomh
Copy link

csomh commented Sep 6, 2022

We decided to close this in favour of other work. If you still think it's important, please re-open it.

@csomh csomh closed this as completed Sep 6, 2022
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

4 participants