Git error on git pull (unable to update local ref)

My team and I ran into this error, unable to update local ref, when doing a pull in SourceTree. Update 2020: Per @Edward Yang’s answer below, @bryan’s comment on this answer, and this question/answer you may need to run both git gc –prune=now and git remote prune origin. Running only the former has always worked for me but based on ppl’s responses … Read more

! [rejected] master -> master (fetch first)

The answer is there, git is telling you to fetch first. Probably somebody else has pushed to master already, and your commit is behind. Therefore you have to fetch, merge the changeset, and then you’ll be able to push again. If you don’t (or even worse, if you force it by using the –force option), you can … Read more

Git: “please tell me who you are” error

I have app servers that I bootstrap together using Chef + some ad-hoc bash scripts. The problem is, when I want to run an update on one of these app servers, I get: Do I really need to set this for doing a simple git pull origin master every time I update an app server? Is there … Read more

How to add multiple files to Git at the same time

To add all the changes you’ve made: git add . To commit them: git commit -m “MY MESSAGE HERE” #-m is the message flag You can put those steps together like this: git commit -a -m “MY MESSAGE HERE” To push your committed changes from your local repository to your remote repository: git push origin master … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)