Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

How can I push to remote with flag "--no-follow-tags"? #1255

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

Closed
church6 opened this issue May 26, 2021 · 0 comments
Closed

How can I push to remote with flag "--no-follow-tags"? #1255

church6 opened this issue May 26, 2021 · 0 comments

Comments

@church6
Copy link

church6 commented May 26, 2021

I usually use comamnd "git push origin remote --no-follow-tags" to push my codes.
But when I use gitpython, I got error below:

Traceback (most recent call last):
  File "/home/android/bin/push.py", line 191, in <module>
    main()
  File "/home/android/bin/push.py", line 186, in main
    work()
  File "/home/android/bin/push.py", line 177, in work
    git_repo.git.push(url, remote)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 588, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1134, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 931, in execute
    raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git push ssh://[email protected]:29418/kernel/msm-5.4 HEAD:refs/for/DEV_branch --no-follow-tags

my code is:

url = "ssh://[email protected]:29418/kernel/msm-5.4"
remote = "HEAD:refs/for/DEV_branch --no-follow-tags"
git_repo.git.push(url, remote)

How to fix my issue?
Thanks!

@Byron Byron closed this as completed May 26, 2021
@gitpython-developers gitpython-developers locked and limited conversation to collaborators May 26, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Development

No branches or pull requests

2 participants