What are the differences between “git commit” and “git push”?

Basically, git commit “records changes to the repository” while git push “updates remote refs along with associated objects“. So the first one is used in connection with your local repository, while the latter one is used to interact with a remote repository. Here is a nice picture from Oliver Steele, that explains the Git model … Read more

How do I resolve git saying “Commit your changes or stash them before you can merge”?

You can’t merge with local modifications. Git protects you from losing potentially important changes. You have three options: Commit the change using git commit -m “My message” Stash it. Stashing acts as a stack, where you can push changes, and you pop them in reverse order. To stash, type git stash Do the merge, and … Read more

Remove file from latest commit

I think other answers here are wrong, because this is a question of moving the mistakenly committed files back to the staging area from the previous commit, without cancelling the changes done to them. This can be done like Paritosh Singh suggested: git reset –soft HEAD^ or git reset –soft HEAD~1 Then reset the unwanted … Read more

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