Four Git Commands That You Should Know

@lee-rowe
4 min readApr 25, 2022

Git is an incredibly powerful tool and is essential for many people that program daily, especially when doing so in a team setting. Git is widely used in the software industry and is something that will benefit you greatly if well versed. In this short blog post I will try to help you gain more of an understanding of a few different commands that are very frequently needed as well as incredibly useful when using Git.

Photo by Markus Winkler on Unsplash

An in depth explanation on how to push using Git

Git push

The first command the I will be covering is the final step that is needed when pushing files to GitHub. After committing your changes, the next thing you want to do is send your changes to the remote server, Git push allows you to upload your commits to the remote repository.

git push <remote> <branch-name>

If it happens to be a new branch, you will also need to upload the branch with the following command:

git push --set-upstream <remote> <name-of-your-branch>

or

git push -u origin <branch_name>

--

--

@lee-rowe
@lee-rowe

Written by @lee-rowe

Data Scientist/Engineer | Create Value | if data: data.science()

No responses yet