Laravel + Angular project commit error: src refspec master does not match any - git-commit

There is a project that is coded using angular and laravel. I downloaded it from server to my local. After doing some cleaning, tried to commit to git. But I see the same error everytime which I specified on header.
After some tests, when I was looking here for the same errors, I couldn't find any solution. There are my steps:
1. cd sysGarden
2. git init
3. git add .
4. git commit -m "first commit"
5. git remote add origin git#github.com:biyro02/sysGarden.git
6. git push -u origin master
After the last step I saw errors. I have an account on github. You can look: https://github.com/biyro02/sysGarden
On git bash, I have logged in with my user name and password. Everything ok but I see errors. Please help me. This is my first git commit. I am ready to share my all infos. Just, I want to exceed this problem.
Edit: I execute "git branch" result: * master
Edit 2: I got the error below:
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists

You should be able to resolve this issue by running the following commands again.
git add .
git commit -m 'Commit Message Here'
git push -u origin master
You may also try git push origin HEAD:master and if you need more information to share you can try git show-ref to see more verbose your local branch information.
This issue likely happens because of unstaged / untracked files or because your current branch is different to the branch you are pushing but I cannot be certain.

Related

how to upload project folder on github branch

Well I'm working on rails project. Well I want o upload updated version of whole application on github branch name "dev_Bee". So can you tell me the step wise procedure how to upload my application on a specific branch. Well I'm working on ubuntu so please try to give commands for ubuntu.
Since you are using rails I'll assume your project has already git initiated.
First, you need to stage all the changes and commit
git add .
git commit -m 'Your Commit Message Here'
Then checkout to a new branch of your desired name
git checkout -b dev_Bee
Set your remote repository
git remote set-url origin https://github.com/<gitusernamehere>/<git-repo-name-here>.git
And finally push the changes to remote
git push -u origin dev_Bee

Linking your github through the aws cloud 9 text editor

I keep getting the error message below when I try to commit my changes to GitHub. Any solution on how to get around this? I'm still a novice when understanding how to push changes I've made to github from the new code I've added.
fatal: 'changes' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Git is trying to push to the repository named changes. But returns a failed response either because the remote name doesn't exist or the path given is wrong. Here, the remote name doesn't even exist (that's the meaning of this error).
[ ] Check your `git remote -v` to see if a remote named `changes` exist
[ ] Configure `changes` as a remote address
First, check what you've configured remote to be
$ git remote -v
origin git#github.com:ashwink823/project.git (fetch)
origin git#github.com:ashwink823/project.git (push)
In the above example origin is the name of the remote we've configured git to fetch from or push to. If I try to push to a remote named changes it will return a fatal error because we haven't configured changes to be a remote address.
$ git push changes
fatal: 'changes' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
But if I add changes like
$ git remote add changes git#githubcom:clmno/project.git
# now, this will work
$ git push changes

created bitbucket repo deleted it, created again, git remote push fails

I am using cloud9 IDE on a rails tutorial app. I created a repo and then pushed the app to the repo on bitbucket. I got messed up on the app so decided to start from beginning. I deleted the repo and worked on the app until it worked. I created another repo on bitbucket and did all commits and when I did these I got a message saying I was three or five commits ahead of remote. So when I did a push I got
git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
Everything up-to-date
If you don't mind starting from scratch and losing your app's history.
Create a new repo on Bitbucket.
Next, remove the .git directory from your local project.
Then initialize a new git repo locally
git init
git add --all
git commit -m "Initial commit"
On Bitbucket you'll see a screen like the one below.
Now just run the commands as exactly as it instructs
cd /path/to/my/repo
git remote add origin git#bitbucket.org:your-username/project.git
git push -u origin --all
git push -u origin --tags
Then everything should be reset without any history.

Trouble pushing changes to remote Git repo

I have started learning Ruby on Rails and Git.
Whenever I try to push any changes to my remote repo on Github, I encounter the following error:
C:\Sites\first>git push origin master
To git#github.com:piy9/Twitter_clone.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git#github.com:piy9/Twitter_clone.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
NOte: I have added all the files in the directory and committed the changes. I have not created any separate branches using pull or checkout.
I am not asking for a solution to the problem.
doing
git push -f or
git push origin +HEAD
worked for me.
What I want to know is, why am I getting the error while trying to push to the original branch.
follow this and get everything works....
git branch production
git checkout production
#do some code changes
git commit -am "some desparate code changes to try fix heroku"
git push heroku production:master
Note: this will get your work done and will leave your previous branch.
or you can try this one also git push heroku +master
Looks like remote branch is ahead of yours, which means it contains something your local branch does not have. You may easily see commits on remote branch since when local branch was created or updated (assuming you run "git fetch origin/master" to fetch remote changes first):
git diff HEAD...origin/master
The output will answer your question why you are getting the error.
Now, my guess about the reason of the problem you have is that either someone has access to remote and pushed something, or you modified something using github editing interface and committed since last checkout/pull/merge. Using forced push as you did is not a good approach and it messes the history, it basically overwrites the remote branch with your copy, ignoring any remote changes.

Issue trying to push to git repository

Problem when pushing app to github. This is what I entered into the command line. Hopefully it's just a small problem I can fix thanks.
git init
git add README.md
git commit -m "first commit"
git remote add origin git#github.com:travi5567/first_app.git
git push -u origin master
This is the error I get:
Traviss-MacBook-Pro:sample_app Travis$ git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If you don't know how to use SSH keys or would rather not you can also use the https remote like so:
git remote add origin https://travis5567#github.com/travis5567/first_app.git
git push origin master
Password for travis5567: <enter your password>
# regular output from a git push
GitHub uses SSH keys to configure access to git repositories. If you are the owner you can push to the repo but you need to tell git your SSH key so they know who you are first.
It's all explained on the GitHub website - https://help.github.com/articles/generating-ssh-keys

Resources