refspec

How to configure specific upstream push refspec for Git when used with Gerrit?

房东的猫 提交于 2019-12-29 03:05:07
问题 I'm setting up Git with Gerrit Code Review and am looking for a way to make the necessary Git commands relatively straightforward for users who might be new to Git. The commands I currently have for starting a new feature branch are essentially (assuming Gerrit is origin ): git checkout baseline git pull git checkout -b work1234 git push -u origin work1234 This starts a new work package work1234 branched from some baseline , and the final push creates the branch in Gerrit and sets the

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 error: src refspec master does not match any error: failed to push some refs [duplicate]

百般思念 提交于 2019-12-20 08:35:16
问题 This question already has answers here : Message 'src refspec master does not match any' when pushing commits in Git (71 answers) Closed 6 years ago . I am trying to add a file to my repository on BitBucket and I am having trouble. I am using GIT and this is what I type in $ cd lis4368/assignments $ git remote $ git remote -v $ git remote rm origin and then I type this in (this is what BitBucket tells me to enter) $ git remote add origin https://cpb09e@bitbucket.org/cpb09e/cpb09e.git $ git

Obtain the latest refspec on a Gerrit Change

风格不统一 提交于 2019-12-03 12:37:02
问题 How can I obtain the latest refspec on a gerrit change through a single command. I need the output as "refs/changes/11/1234/4". Is there any git command for the same I do know that ssh commands combined with gerrit query and a bit of scripting can obtain this, but want to know if there is any better way to do the same. Following is the ssh command I would use to get the refspec. ssh -p $REVIEW_SERVER_PORT $GERRIT_REVIEW_SERVER gerrit query --format=TEXT --current-patch-set $CHANGE_SHA | grep

Obtain the latest refspec on a Gerrit Change

﹥>﹥吖頭↗ 提交于 2019-12-03 03:01:14
How can I obtain the latest refspec on a gerrit change through a single command. I need the output as "refs/changes/11/1234/4". Is there any git command for the same I do know that ssh commands combined with gerrit query and a bit of scripting can obtain this, but want to know if there is any better way to do the same. Following is the ssh command I would use to get the refspec. ssh -p $REVIEW_SERVER_PORT $GERRIT_REVIEW_SERVER gerrit query --format=TEXT --current-patch-set $CHANGE_SHA | grep ref. Similarly, I would also want to get the LATEST PATCHSET of the gerrit change You should use the

Git error: src refspec master does not match any error: failed to push some refs [duplicate]

孤街浪徒 提交于 2019-12-02 16:07:40
This question already has an answer here: Message 'src refspec master does not match any' when pushing commits in Git 70 answers I am trying to add a file to my repository on BitBucket and I am having trouble. I am using GIT and this is what I type in $ cd lis4368/assignments $ git remote $ git remote -v $ git remote rm origin and then I type this in (this is what BitBucket tells me to enter) $ git remote add origin https://cpb09e@bitbucket.org/cpb09e/cpb09e.git $ git push -u origin master And I keep getting this error message: error: src refspec master does not match any. error: failed to

How to configure specific upstream push refspec for Git when used with Gerrit?

左心房为你撑大大i 提交于 2019-11-28 17:18:28
I'm setting up Git with Gerrit Code Review and am looking for a way to make the necessary Git commands relatively straightforward for users who might be new to Git. The commands I currently have for starting a new feature branch are essentially (assuming Gerrit is origin ): git checkout baseline git pull git checkout -b work1234 git push -u origin work1234 This starts a new work package work1234 branched from some baseline , and the final push creates the branch in Gerrit and sets the upstream. So .git/config looks something like: [branch "work1234"] remote = origin merge = refs/heads/work1234