A repository that contains life and timer saver git commands; rollback, revert, etc. (in-progress)
- How to delete all local git branches?
- How to undo the last commit from a remote git repository?
- How to revert merge?
- How to revert conflicted merge?
- How to Checkout/Update a Single File From Remote Origin Master?
- How to pick a commit and apply current branch from another branch? (cherry-pick)
- How to remove untracked files?
- How to add a message to stash?
- How to bring nth record from the stash list without removing it?
- How to bring last entry to the stash list and remove?
- How to delete a stash record from the list?
- How to move latest changes to stash with different branch?
- How to visualize all git logs?
git branch --list | grep -v 'master' | xargs git branch -D
git reset HEAD^
git push origin +HEAD
# create new branch for being safe.
git revert -m 1 <MERGE_COMMIT_ID>
git push
git merge --abort
git checkout origin/<branch-name> -- <path-to-file>
git cherry-pick <commit_id>
git ls-files --others --exclude-standard | xargs rm
git stash save "Your stash message"
git stash apply {n} # n is optional, from nth history.
git stash pop
git stash drop
git stash branch <new-branch-name>
git log --oneline --graph -decorate --all