foobar
Branch off from the master
branch.
$ git checkout master
[master] $ git checkout -b foobar
foobar
Work 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
foobar
Merge 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.