Reset meaning deleting the .git folder and starting again. This works locally but not on github. Dont remember what happens when this is tried. I think github still keeps the history. I will have to try again.
In my experience as a developer, the most useful git commands(unrelated to pushing to repository) would be git restore . and git stash(as well as git stash apply)
Here’s another useful command to list all branches along with the date they were last worked on and the last commit message; you can use the following command:
This command will output the branches with their last commit date, the branch name, the last commit hash, and the last commit message in descending order of the commit date. Here’s what each part of the command does:
git for-each-ref: Iterates over each reference (branch in this case).
--sort=-committerdate: Sorts the branches by the date of the last commit in descending order.
refs/heads/: Limits the iteration to local branches.
--format='%(committerdate:iso8601) %(refname:short) %(objectname) %(subject)': Formats the output to show the commit date in ISO 8601 format, the branch name, the commit hash, and the last commit message (subject).