Becoming Friends With Github: A Guide To Git

Vincentivos
2 min readOct 22, 2021

Working with Github can seem like a bit of a mystifying experience for those that have just begun using it. Pull, push, merge, clone, sync, publish. It seems like a barrage when all you want to do is update a project from VS code. In this post I would like to explain what some of these actions do in order to distinguish them from one another.

First I would like to make a point of differentiating the types of branches. Main/master and origin/remote. Your main branch is the primary branch of all repositories. All committed and validated changes are on the master branch. You can work directly from the master branch, or create remote branches. Origin is the name assigned to the remote repository that your local repository was cloned from.

Now I would like define some of the terms mentioned above.

Pull requests allow you to communicate with other users regarding changes you’ve pushed in your repository. When a pull request is opened, you can discuss changes with other programmers and push additional commits prior to the changes being merged into the base branch.

Push is simple. The Git push command uploads all local branch commits to the remote branch of that repository.

Merge is a bit tricky, but essentially the git merge command allows you to take multiple remote branches and combine them into a single branch, removing forked development for better workflow.

Git sync is used when a you want synchronize a fork with it’s corresponding upstream repository. . Sync will update the branches in the personal fork which are also in upstream repository

A clone is a copy of a repository or the action of copying a repository. When cloning a repository into another branch, the new branch becomes a remote-tracking branch that can communicates upstream to its origin branch through git commands.

Publish makes your local branch available to your remote branch, as well as making so the local branch is tracking the remote branch.

There is so much terminology I have not mentioned, but these are a few which I know that all Github users like myself work with on a constant basis. I have found that learning the little I know of the git glossary has saved me a lot of time. I hope that this was read was compact and informative.

--

--