ApplicationName='/usr/lib/gnome-terminal-server', CommandLine='--app-id mono.develop.ide963f767d119495a8eabaf1d66c8049f',CurrentDirectory=",Native error= Cannot find the specified file
Removing the last commit
To remove the last commit from git, you can simply run git reset --hard HEAD^
If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.
If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^
which will evict the commits from the branch and from the index, but leave the working tree around.
If you want to save the commits on a new branch name, then run git branch newbranchname
before doing the git reset.
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
# First, check out the commit you wish to go back to (get sha-1 from git log) | |
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a | |
# Then do a forced update. | |
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop | |
# Push specific commit | |
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f |
Setup GitHub Pages "gh-pages" branch as a subfolder within the "master" project on your local checkout.
If you plan on switching between different branches (e.g. git checkout master-experiment
then revert back with git checkout master
) you will loose your child
folder from this tutorial (because it's in your
.gitignore and is not part of your master
branch).