There are many potential Git workflows. The following is a basic workflow for someone working alone, using different local branches, pushing directly the master remote branch.
To make a new branch locally:
git checkout -b my_branch_name
- create and move to a new branch- Do work.
git status
- check on things.git add .
- stage changes to be committed.git commit -m "my_commit-message"
- commit changes.git status
- check on things.git checkout master
- move to the master branch.git branch
- see local branches and see which local branch you are on.git merge my_branch_name
- update the master branch with the changes from the branch you were working on.git push origin master
- push your local changes to your online GitHub repository.
Note: replace my..._ with the name/message of your choice.