1.2 KiB
1.2 KiB
# How to Write a Git Commit Message
# https://chris.beams.io/posts/git-commit/
GIT_PROMPT_ONLY_IN_REPO=1
source $HOME/.bash-git-prompt/gitprompt.sh
# start nove lokalni vetve
git checkout -b new_branch
# start lokalni vetve navazanou na remote
git checkout -b serverfix origin/serverfix
# tracking branch
git branch -u origin/serverfix
git branch --set-upstream-to origin/serverfix
# delete local branch
git branch -d mbl/test
# delete remote branch
git push origin --delete mbl/test
# fetch with delete remote links
git fetch -p
git reflog show
git log --oneline
# fixup
git commit --fixup fb2f677
git fetch origin
git rebase -i --autosquash origin/master
git push -f origin mbl/first-touch
# prepsani hlasek a podobne
git rebase -i origin/master
# revert git add
git reset
# undo last commit
git reset --soft HEAD~1
# unstage
git reset HEAD
# reset to master
git reset --hard origin/master
----------------------------------------------------------
git rebase -i -origin/master
# u daneho commitu nastavit "edit"
# reset na predeslou verzi
git reset HEAD^
# proved veskere dilci commity
git rebase --continue
# pouzije comment z jineho commitu
commit -pc <commit-hash>