• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

error: src refspec master does not match any

January 13, 2014 by Sharad Chhetri Leave a Comment

While working in Github,I was trying to push my code in my Github repository.After deleting all files from repo,I tried to push the new code.But I encounter with given below Error:

error: src refspec master does not match any.
error: failed to push some refs to ‘https://github.com/sharadchhetri/sharadchhetri.github.io’

To solve this error,run the below given command

git add .
git commit -m 'write your message'
git push origin source --force

Below is the reference of my troubleshooting

sharad@localhost:/opt/sharadchhetri.github.io$ git push origin master
Username for 'https://github.com': user@example.com
Password for 'https://user@example.com@github.com':
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/sharadchhetri/sharadchhetri.github.io'
sharad@localhost:/opt/sharadchhetri.github.io$
sharad@localhost:/opt/sharadchhetri.github.io$
sharad@localhost:/opt/sharadchhetri.github.io$
sharad@localhost:/opt/sharadchhetri.github.io$
sharad@localhost:/opt/sharadchhetri.github.io$ git show-ref
d90e1b91071539ddf90ee2b69f3404c3dbfcfb99 refs/heads/source
5a6b8e4352f25aa65e2dafeec2fa8f506d0830fa refs/remotes/octopress/2.5
277f70271f022dfd277275b59f5baecdff5965a6 refs/remotes/octopress/2.5-simplify-rakefile
0b44a79a51d0fe96ffd8138cb4a62d9307569b85 refs/remotes/octopress/3.0
8f51bdc0fd0323c4a6bd9fd645f3abb73baccd08 refs/remotes/octopress/HEAD
d4896764ed3bc757f3ab617c70daf85f2356d85a refs/remotes/octopress/commander
43810533b491802805f4493c03f0a52dfc3abbac refs/remotes/octopress/gh-pages
7bdab0e65c86d8bd9fe3b46a4bf1ca92b1e1a54e refs/remotes/octopress/guard
fc73997a5d4e3c76037985749b0ccc48ae69fa5c refs/remotes/octopress/jekyll-1-3
1750830c63aacc13fce85b7e4de53541c024ccef refs/remotes/octopress/linklog
8f51bdc0fd0323c4a6bd9fd645f3abb73baccd08 refs/remotes/octopress/master
9b599404c7f14fc37f24f887cfb337d5d47ad38e refs/remotes/octopress/migrator
8fe52e18bc65dbebe3b6bcc93267fb81325aff88 refs/remotes/octopress/refactor_with_tests
9f54cbd0f7dcaa6224ba03fb98e705b138530976 refs/remotes/octopress/rubygemcli
53b2df0231df45c1225da94f9fc985eee5f794df refs/remotes/octopress/site
98bd6c9bceb9e9c63451cc736628ff0e2d58a2af refs/remotes/octopress/site-2.1
c24852e3840cd679c56d994c6e3ff2651e19d2ea refs/remotes/origin/master
5bd0566e3b9f849720dc4472faacebb0848be9b7 refs/remotes/origin/source
292a6d563efb51be1ae34af36252a0a604763972 refs/tags/v2.0
sharad@localhost:/opt/sharadchhetri.github.io$
sharad@localhost:/opt/sharadchhetri.github.io$
sharad@localhost:/opt/sharadchhetri.github.io$ git push origin master --force
Username for 'https://github.com': user@example.com
Password for 'https://user@example.com@github.com':
Counting objects: 12, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (8/8), 1.73 KiB | 0 bytes/s, done.
Total 8 (delta 4), reused 1 (delta 1)
To https://github.com/sharadchhetri/sharadchhetri.github.io
 + 5bd0566...d90e1b9 master -> master (forced update)
sharad@localhost:/opt/sharadchhetri.github.io$

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. ERROR: Module rewrite does not exist
  2. error: The requested URL returned error: 403 Forbidden while accessing Github repo
  3. master admin password openerp 7.x
  4. Setup Master Slave Chroot BIND DNS in CentOS 6 or Red Hat 6
  5. Setup MySQL master slave replication in CentOS 6
  6. This XML file does not appear to have any style information associated with it, RSS Feed problem(wordpress)
  7. Your data directory and files are probably accessible from the internet because the .htaccess file does not work owncloud
  8. htaccess file does not work : Owncloud 6 in Ubuntu 13.10 Server
  9. fatal error: error writing to /tmp/ccwAjc9Z.s: No space left on device
  10. dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Filed Under: Git Server Tagged With: git

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Linux Commands

Linux Tac Command : Reverse Of cat Command Output

Temporarily change the shell after login

awk command to print columns from file

type Command : Display Information About Command Type On Linux

grep command to find multiple strings or keyword from file

There are unfinished transactions remaining. You might consider running yum-complete-transaction

create a system account below uid 500 on RHEL/CentOS/Scientific Linux

Explore 70+ Articles On Linux Commands

Always Useful Tips And Tricks

How to convert float to integer number

Password prompt in single user mode is not secure : CentOS/Red Hat

set and unset line number in file with vi editor

How to see line numbers in file through cat command

Unix / Linux : How to print duplicate lines from file

How to add/install Ubuntu fonts in CentOS/Red Hat Linux

How to set JAVA environment variables in Linux or CentOS

Explore 90+ Article On "Linux Tips And Tricks"

You Might Like These Articles!

Internal External Command

What is Linux/Unix Internal And External Command

Linux basic command

Linux Basic Commands For Every Beginner

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission but Schools and Colleges can do in their Private Network
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy