git troubleshooting
- Problem : - Git simple pull-push steps
- Clone repo [ git clone git://xyz.com/projects/myproject.git ]
- Add files [ git add . ]
- Commit all files [ git commit --all ]
- Set remote url [ git remote set-url origin git@git://xyz.com/projects/myproject.git ]
- Push changes [ git push -u origin master ]
- Problem : - git clone gives warning: “remote HEAD refers to nonexistent ref, unable to checkout.
- Solution 1:
- Make sure the Submit/Push privileges are appropriately assigned to users/groups in Gerrit for the current project.
- Then make an initial commit on the cloned repo, copy that commit-id and create a new branch in
- Gerrit => Admin => Projects => Branches => Create New Branch
- This creates master branch on repo, and further clones will not get the warning mentioned above.
- Solution 2:
- While creating the project,
- ssh -p 29418 gerrit create-project –name –empty-commit # –empty-commit creates the initial commit and master branch gets created
Comments
Post a Comment