Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

3 participants