git configure upstream for branch push and pull

C++
# if remote_branch_name == local_branch_name
$ git push -u origin HEAD
Source

Also in C++: