git reset --hard origin/<branch_name>
git checkout --orphan latest_branch
git add -A
git commit -am "commit message"
git branch -D main
git branch -m main
git push -f origin main
Code Example |
---|
:: |
:: |
Shell :: |
:: |
:: |
:: vim hangs |
:: |
Shell :: |
:: |
:: |
:: |
:: |
Shell :: |
:: |
:: |
Shell :: |
:: git init at wrong folder |
Shell :: |
:: |
:: |
:: |
:: |
:: show users in sudo group |
:: how to change time zone in ubuntu 18.04 server |
:: |
Shell :: |
Shell :: git delete last commit after push |
:: |
:: |
:: |