GIT F.U.C. (Frequently Used Commands)

git checkout -b <feat-xyz>
git branch
git status
git stash #or git reset --hard origin/<remote-branch>
git add <file name> # or git add --all (to add all files)
git commit -a -m “<some messagge>”
git push # or git push -u origin <feat-xyz>
git pull # or git fetch && git pull
git commit --amend 
git push origin --force-with-lease
# Rebase a feat-branch on the final branch
git checkout <final-branch>
git pull
git checkout <feat-xyz>
# use git rebase <final-branch>
# or better (-i squashs all commits… no -i doesn’t)
git rebase -i <final-branch>
# Leave just one commit changing “pick” with “f” letter
git push origin --force-with-lease
git tag -a v1.4 -m "my version 1.4"
git tag -l

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store