Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #9587

Closed
Open
Created Aug 26, 2015 by Administrator@rootOwner

Instructions on bare repo for pushing up from existing folder need to tell user to commit

Created by: pbx

When you go to the home page of a project with an empty repo, the "Existing folder or Git repository" instructions are:

cd existing_folder
git init
git remote add origin gitlab@gitlab.example.com:repo.git
git push -u origin master

This probably works if you are pushing from an existing Git repo. However, if you execute the above verbatim in an existing folder that is not already a Git repo, the last command fails with:

error: src refspec master does not match any.
error: failed to push some refs to gitlab@gitlab.example.com:repo.git

The missing piece is: if the user is creating a new git repo locally, they need to make a commit before trying to push.

Assignee
Assign to
Time tracking