Git: Pull, Commit and Push. Order Does Matter

When you are ready to start saving changes to your project, there are steps you need to do in a certain order, especially if you are working with teams.

That order is:

  1. Pull — fetch and merge all commits from the remote server(GitHub). Ex. git pull origin<remote server>master<branch>
  2. Add — Adds the changes to the next commit. Ex. git add .(the period with add all files with changes)
  3. Commit — commits the added changes to a snapshot ready to transmit. Ex. git commit -m “create enemy” (the -m adds a description to the commit)
  4. Push — transmit the local branch commits to the remote server(GitHub). Ex. git push origin<remote server> master<branch>

Following this order will help eliminate the headaches of merge conflicts.

Pull, add, commit and push




Unity / C# Game developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Amazon Interview Question — LeetCode 1143

The Web Experience — A Week With CloudReady

Unit Testing: Tell Your Doubles Apart

All About Bloom Filters

Apache Nifi: Part-III Create Custom Processor using Custom Controller

Making the Transition from Waterfall to Agile

Waterfall to Agile

Apache Webserver Configuration In Docker Using Ansible…

Our favourite insights from Smashing Conference — Sensei Labs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bill Rislov

Bill Rislov

Unity / C# Game developer

More from Medium

Learn to code by making a 2D space shooter game.

Day 3 of my journey to becoming a Unity game developer

Setting Up Git

What is the document object model (DOM)