Git – Basic commands

$ git add .

$ git add README.md

$ git commit -m “Comment commit”

$ git status

$ git branch -M main
$ git remote add origin git@github.com:OlearnDev/git.python.git
$ git push -u origin main

$ git branch

NB: Following commands will create a new branch and merge in main

$ git checkout -b new-feature main

Edit some files

$ git add
$ git commit -m “Start a feature”

Edit some files

$ git add
$ git commit -m “Finish a feature”

$ git checkout main

Edit some files

$ git add
$ git commit -m “Make some super-stable changes to main”

$ git merge new-feature
$ git branch -d new-feature