Compare commits
9 Commits
v1
...
e3cf7206bc
| Author | SHA1 | Date | |
|---|---|---|---|
| e3cf7206bc | |||
| 3bc14e9d1d | |||
| b0df68f468 | |||
| f0e3e9fd10 | |||
| d9bffb8ea4 | |||
| c7bcc2e1b0 | |||
| 1fc314a99c | |||
| 4e9ce7b67f | |||
| 5d07537b37 |
24
GIT.md
Normal file
24
GIT.md
Normal file
@@ -0,0 +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
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user