git branch -m <new-branch-name>
git branch -d <local branch name>
- push current local branch to remote branch with same name if it doesn't exist
- remove commit if it wasn't pushed yet - [HEAD~1] - to 1 commit where HEAD is
git restore --staged <file>
git remote set-url <remote-name> <new-remote-url>
- list all remotes with urls
git config --global user.name "Artur Ferfecki"
git config --global user.email "[email protected]"
git config --global alias.co checkout
git config --global alias.cob "checkout -b"
git config --global alias.cmm "commit -m"
git config --global alias.ap "add -p"
git config --global alias.poh "push origin HEAD -u"
git config --global alias.s status
git config --global --unset alias.co
- after commiting, creating pull request and merging to master branch you need to pull the latest version:
- fetch all tags and branches from origin
- check if the tags were correctly fetched:
- create the (annotated tag):
git tag -a <tag> -m "<tag message>"
- push tag to remote