foobarBranch off from the master branch.
$ git checkout master
[master] $ git checkout -b foobar
foobarWork on foobar branch and push to remote
foobar branch constantly.
$ git checkout foobar
[foobar] $ git add .
[foobar] $ git commit -m "Add foobar."
[foobar] $ git push origin foobar
foobarMerge foobar branch into master branch.
$ git checkout master
[master] $ git diff foobar
[master] $ git merge --no-ff foobar
[master] $ git branch -d foobar
[master] $ git push origin master
master to main if you like.