git push -f
This is very useful whenever you need to discard the changes that you have made and start over.
git push -f
git checkout <branch_name>git branchgit checkout -b <branch_name> <from_branch_name>git init .git add .git commit -m "My first commit"git commit -a -m <message>git commit.git remote add <name of the remote> <url>git pushgit config --global --add user.email <your email>git config --global --add user.name <your user name>
commit 6e523791f2fde1581d3d42b2fc4f84a0a1d0d9df
Author: Your Name <your_name@gmail.com>
Date: Wed Apr 26 15:09:02 2017 -0700
Some comment.git config --listIf you need to override a remote branch with local changes, then you can use: git push -f This is very useful whenever you need to disc...