Post-it to: http://erikaybar.name/git-deleting-old-local-branches/
-
git remote prune origin
-
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d
Post-it to: http://erikaybar.name/git-deleting-old-local-branches/
git remote prune origin
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d
git reset HEAD~
This leaves your working tree (the state of your files on disk) unchanged but undoes the commit and leaves the changes you committed unstaged (so they’ll appear as “Changes not staged for commit” in git status
, and you’ll need to add them again before committing).
git commit --amend -m "updated message"
source: https://help.github.com/articles/changing-a-commit-message/#commit-has-not-been-pushed-online
source: http://stackoverflow.com/a/927386/2179668
git reset HEAD~
git config --global alias.poule 'pull' git config --global alias.s 'status' git config --global alias.hist 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short' git config --global alias.a 'add .' git config --global alias.pu 'pull' git config --global alias.ac "!git add . && git commit" git config --global alias.pp "!git pull && git push" git config --global alias.po 'push'
My favorite is obviously “ac” because I can do
git ac -m "my commit message"
and this simple line add and commit all the modified files 🙂
And I also use a lot git pp
to pull and push in one line!
Add all the changes to the commit
git commit -a -m "message"