Web Developer how-to

How to Commit and Push Changes with Git

Version control protects your work and lets teams collaborate.

Updated By the Career Education Institute Curriculum Team
Quick answer

Version control protects your work and lets teams collaborate. In short: create; make; stage, then complete the remaining steps below.

Step by step

  1. Create a branch for your change: git switch -c feature-name.

  2. Make your edits and check what changed with git status and git diff.

  3. Stage the changes with git add.

  4. Commit with a clear message describing why: git commit -m "Add pricing page".

  5. Pull the latest main branch and resolve any conflicts.

  6. Push your branch: git push -u origin feature-name.

  7. Open a pull request for review.

Safety reminders for web developers

  • Never commit passwords or API keys to repositories
  • Validate and sanitize user input to prevent security vulnerabilities
  • Keep dependencies updated
  • Follow privacy laws and accessibility requirements

HTML · CSS · JavaScript · Responsive design · Front end · Back end: see the full web developer glossary.

More web developer how-to guides

Enroll in trainingTake fit quiz