Rebasing commits to amend or group commits

So you made some mistake with your previous commit but dont want to make hundreds of commits and want to have nice looking reflog. You can do some rebasing with this command

Adding existing project to git

When I was new to GIT this scared me, I was afraid I could somehow delete my current project or something like that, but it is rather trivial to add new GIT repo to existing project. All you need to do is add a remote config and do some initializations. Basically you do this

Using GIT with drupal7, do not put core into GIT

This is tutorial how to setup a drupal 7 site with git but without putting drupal core into git, reason is that you don't need it in git unless you are patching core. As drupal core is always the same and updated with drush, version control is not needed at least there is a stream of opinion that goes into that direction.  So what do you do, you only put sites folder into git.

GIT - reseting hard, moving to previous commit after merge

git reset --hard c517b565b2bcc0cf2ca5265b6ea6657f253fe2af
git push -f

to move git to previous commit and push it to remote server, we first need to reset hard to SHA value and then push it with force to overide current state