Add documents in current folder
$ git add .
Add a specific file
$ git add README.md
Add a comment
$ git commit -m “Comment commit”
Check status
$ git status
Connect to a main branch and push updates
$ git branch -M main
$ git remote add origin git@github.com:OlearnDev/git.python.git
$ git push -u origin main
See branches
$ git branch
NB: Following commands will create a new branch and merge in main
Start a new feature
$ 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”
Develop the main branch
$ git checkout main
Edit some files
$ git add
$ git commit -m “Make some super-stable changes to main”
Merge in the new-feature branch
$ git merge new-feature
$ git branch -d new-feature