git-refspec

git push error: src refspec main does not match any on linux

大兔子大兔子 提交于 2020-12-30 04:35:28
问题 whenever I'm trying to upload my files using git push -u origin main I'm getting error which is as follows error: src refspec main does not match any error: failed to push some refs to 'github.com:xxxxxx/xxx-project.git' but if I do git push -u origin master it is working perfectly and uploading my files to a separate branch named master . upon checking .git/refs/heads in my project i saw that there is only one file named master so i performed git remote update which added .git/refs/remotes

Git push Refspecs: `refs/heads/*:refs/heads/origin` vs `refs/heads/*:refs/heads/*`

我的梦境 提交于 2019-12-24 10:51:53
问题 Which push Refspec (Git) is correct? Or both are correct? What is the difference? refs/heads/*:refs/heads/origin/* refs/heads/*:refs/heads/* I prefer (1) because it references remote name (origin), and I don't understand what (2) means (but I see it used in some manuals!). 回答1: With refs/heads/*:refs/heads/origin/* , git push origin master would be expanded to git push origin refs/heads/master:refs/heads/origin/master . It will create or update a branch named origin/master in the remote

Git - What is “Refspec”

匆匆过客 提交于 2019-12-03 18:26:32
问题 I've been following this guide on configuring GitLab continuous integration with Jenkins. As part of the process, it is necessary to set the respec as follows +refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/ * Why this is necessary is not explained in the post, so I began looking online for an explanation and looked at the official documentation as well as some related stack overflow questions like this one. In spite of this, I'm still