GitHub flow demo using the command line

  1. Create a new branch with git checkout -b branch-name.
  2. Push your feature branch to the remote (cloud) repository with git push origin branch-name.
  3. Make changes with git add modified-file and git commit -m "commit message".
  4. Resolve any merge conflicts by following the instructions here.
  5. Submit a merge/pull request by following these instructions for GitLab and these instructions for GitHub.
  6. When the review is complete, accept the pull request (on GitLab or GitHub and merge the changes into the main branch.
  7. Delete the new feature branch (on both the remote reposotory and your local copy) with git push -d remote-name branch-name followed by git branch -d branch-name. remote-name is the name of the remote (cloud) repository and will usually be origin by default.