Matlb Projects / Git: The remote update was rejected by the target: refs/heads​/main->ref​s/remotes/​origin/mai​n

1 次查看(过去 30 天)
Hi, I am new to all this version control and trying to work on my repo:
https://github.com/Shrediquette/PIVlab/
In Matlab, I am using the Projects environment which seems to be quite handy. I am Fetching and Pulling directly from github. Then I am modifying files and adding stuff (also mat files are edited, which are marked as binary in the .gitattributes file). When I press Commit, then Push, I get this error:
The remote update was rejected by the target:
refs/heads/main->refs/remotes/origin/main
I don't know how to proceed....
I have no clue of "branches", "tags" etc, and I did not intentionally use any of these. Please help me with my issue, thanks.
  2 个评论
Mario Malic
Mario Malic 2020-11-20
编辑:Mario Malic 2020-11-20
Open github in your project folder, try
git commit -m "testmessage" % m is merge option
git push
However, you might find more informations elsewhere, since this is a Git related issue.
William Thielicke
William Thielicke 2020-11-20
C:\Users\trash\MATLAB\Projects\PIVlab>git push
info: please complete authentication in your browser...
Enumerating objects: 20, done.
Counting objects: 100% (17/17), done.
Delta compression using up to 4 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (10/10), 116.90 KiB | 16.70 MiB/s, done.
Total 10 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
remote: error: GH007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: http://github.com/settings/emails
To https://github.com/Shrediquette/PIVlab
! [remote rejected] main -> main (push declined due to email privacy restrictions)
error: failed to push some refs to 'https://github.com/Shrediquette/PIVlab'
Thank you, it was my email settings. Looks like i fixed it now...

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Source Control 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by