Generated File: Do Not Edit Directly Edit the source files and rerun the generator.
Git Tips Slides
PageUp x2: previous · PageDown x2: next · Home: index

Creating a PR easily

# Go to the base branch of your PR
git switch main

# Get the latest changes from origin
git pull

# Create a new branch. Give it a better name than "my-branch" :-)
git switch -c my-branch

# Now make your changes

# See what changed
git status

# Commit your work to the **local** Git history.
git commit .

# Push your changes to the central Git repo (origin by default)
# The `git push` command will fail:
#  fatal: The current branch my-branch has no upstream branch.
#  To push the current branch and set the remote as upstream, use
#    git push --set-upstream origin my-branch
git push

# I copy+paste the above command, and then execute it.
git push --set-upstream origin my-branch

# The push should be successful, and your Git hosting provider
# will likely show you a message with a URL to create a PR:
# remote: Create a pull request for 'my-branch' on GitHub by visiting:
# remote:      https://github.com/example/some-repo/pull/new/my-branch
Generated File: Do Not Edit Directly Edit the source files and rerun the generator.