Quick Reference of Git Commands (Common Workflows)

Git Tips & Commands

As a handy reference, here are a few common Git workflows you'll use.

Commit & Push

Git pull Git status Git add. Git commit -m "Message that describes what this change does" Git push

Switch to an Existing Branch & Pull Latest Changes

NOTE: The first Git pull ensures we get a list of all branches from the remote.

Git pull Git status Git checkout my-branch-name Git pull Git status

Full-Stack Web Development Certificate: Live & Hands-on, In NYC or Online, 0% Financing, 1-on-1 Mentoring, Free Retake, Job Prep. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

Create a New Branch & Push It for the First Time

Git status Git pull Git checkout -b my-branch-name Git status Git add. Git commit -m "Message that describes what this change does" Git push -u origin HEAD

Go Beyond Git

We offer the best coding courses and bootcamps for students at all levels of experience. Classes are hands-on and students receive workbooks with step-by-step instructions through exercises with real-world applications. Check out our programming courses now:

How to Learn Git

Master Git with hands-on training. Git is a free, open-source version control system that allows developers to track the changes they make to code.

Yelp Facebook LinkedIn YouTube Twitter Instagram