diff --git a/.GIT.md.swm b/.GIT.md.swm deleted file mode 100644 index ed077c7..0000000 Binary files a/.GIT.md.swm and /dev/null differ diff --git a/.GIT.md.swn b/.GIT.md.swn deleted file mode 100644 index 4381d81..0000000 Binary files a/.GIT.md.swn and /dev/null differ diff --git a/.GIT.md.swo b/.GIT.md.swo deleted file mode 100644 index 77fc409..0000000 Binary files a/.GIT.md.swo and /dev/null differ diff --git a/GIT.md b/GIT.md index ab7cadd..63db56d 100644 --- a/GIT.md +++ b/GIT.md @@ -1,4 +1,24 @@ # Git Commands +## Show current branch +``git status`` + ## Show local and online branches ``git branch -a`` + +# Workflow +``` +git status # show our current branch +git switch or git pull # switch to dev / main and pull +git checkout -b "branch-name" # create an new branch based on the current one +git status # show again the current branch + +DO YOUR WORK HERE, EDIT ADD FILES... + +git status # show what we have edited / added +git add . # add all the edits +git commit -m "your message" # this makes the commit locally +git push # sends your commit to the public branch and awaits for pr processing +or +git push --set-upstream origin "branch-name" # this can be asked for the fist time only because the branch does not exists online +```