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_push: Handle command containing force argument #818

Merged
merged 1 commit into from Jul 9, 2018
Merged

git_push: Handle command containing force argument #818

merged 1 commit into from Jul 9, 2018

Conversation

gma2th
Copy link
Contributor

@gma2th gma2th commented Jun 9, 2018

git push --force
fatal: The current branch [branch_name] has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin [branch_name]

Before:
git push --force --force
After:
git push --set-upstream origin master --force

command.output:

03:32:30.280527 git.c:344               trace: built-in: git push --force
fatal: The current branch [branch_name] has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin [branch_name]

Regex stopped at the first git push with --force argument.
Not sure why the command is part of the output though?

@scorphus
Copy link
Collaborator

scorphus commented Jul 7, 2018

Hi @gma2th,

Thank you for contributing to TheFuck.

The tests added in this PR pass even without the change in thefuck/rules/git_push.py.

Can you please add tests that fail with the previous revision?

@nvbn nvbn merged commit 5347824 into nvbn:master Jul 9, 2018
@nvbn
Copy link
Owner

nvbn commented Jul 9, 2018

Thanks!

riley-martine pushed a commit to riley-martine/thefuck that referenced this pull request Dec 7, 2023
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

3 participants