Git
Clear all unstaged changes, including ignored files:
> git clean -dfxFind removed file:
> git log --all --full-history -- **/thefile.*Git pull and rebase:
> git pull --rebaseConfig Git to do a stash before pull and rebase automatically:
# Once
> git pull --rebase --autostash# Permanent
> git config pull.rebase true
> git config rebase.autoStash true> git commit -m "Something terribly misguided" (1)
> git reset HEAD~ (2)
<< edit files as necessary >> (3)
> git add ... (4)
> git commit -c ORIG_HEAD (5)Find and restore a deleted file:
Remove all local branches that have been merged into the branch currently checked out:
Remove untracked branches (replace -D with -d to only remove fully merged branches:
Staging Patches:
Undo Patches:
Replace remote with local branch:
Last updated
Was this helpful?