git undo commit
# Uncommit the changes
git reset --soft HEAD~1
# Completely delete the changes
git reset --hard HEAD~1
git undo commit
# Uncommit the changes
git reset --soft HEAD~1
# Completely delete the changes
git reset --hard HEAD~1
git remove commit
# Removes latest commit from the stash, KEEPS changes
git reset --soft HEAD~
# Removes latest commit from the stash, DELETES changes
git reset --hard HEAD~
git delete local commit
git reset --hard origin/<branch_name>
how to delete a commit from a branch
# How to stash and remove a commit from a branch that has already been pushed
git stash save "<comment>"
git stash pop
# git stash list
git reset --hard HEAD~1
# 1 stands for the amount of commits to go back from HEAD
git push origin HEAD --force
delete commit
git checkout master
git reset --hard e3f1e37
git push --force origin master
# Then to prove it (it won't print any diff)
git diff master..origin/master
delete commit
git revert dd61ab23
java age from date
LocalDate today = LocalDate.now();
LocalDate birthday = LocalDate.of(1987, 09, 24);
Period period = Period.between(birthday, today);
//Now access the values as below
System.out.println(period.getDays());
System.out.println(period.getMonths());
System.out.println(period.getYears());
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us