Note: this answer is for git push in general and not for git with AWS
git push takes in as arguments where you want to send the code (origin), and the branch that you are sending the code from. Thus, if you see in many code examples, git push origin master pushes code to origin from your master branch. If you enter the command git push origin beta, then you push to the beta branch of the remote origin repository from your local beta branch. git checkout is a command that switches the branch you are currently working in. Thus, git checkout beta switches your local repository to the beta branch, and if you make changes and commit them (make sure to commit before switching branches!) they will only change in the beta branch. Likewise, git checkout master switches to your master branch. It does not matter what branch you run git push from, since you specify which branch to push as the second argument.