DEV Community

Cover image for Git for Newbies [0]
Calvin
Calvin

Posted on

Git for Newbies [0]

Git is a version control tool which makes it easier to save different copies (snapshots like a camera) of the work you have done as it regards to your coding projects. Version control systems essentially tracks changes in a series of snapshots. Git is used by teams around the world to enhance workflows and make it easier to collaborate on projects, both big and small.

There are different ways to use Git. It can be used with websites like Github and Gitlab which make it easier to collaborate with people in different locations. While Git acts as a version control tool, websites like Github and Gitlab act almost like a cloud system where different versions of your project can be remotely stored for other people to see, make amendments to, and make reviews of.

You can get started with a platform like Github in different ways:

  1. Through the terminal
  2. Through the website
  3. Through the Github desktop app

The website is one of the easiest ways to get started with Github. On Github.com, a "new" button may be clicked to create a new repository. Once the button is clicked, you may select whether or not to create the repository with a "readme.md" file. After you create the repository, you may choose to commit new files to the repository by either uploading them or directly writing them through the website (and the appropriate buttons) or through your terminal.

There are buttons in your Github repository which are appropriately labelled to allow you to upload files or to create new files. After the files are uploaded or created, you essentially make a commit.

As your project gets bigger, you may find that you need to create different branches for it. This makes it easier to manage the project and get it reviewed by others. There are different workflows which may be used when determining the way to create branches. Some people prefer to work with a development branch and several feature branches while others prefer to work with a master branch and several feature branches. Usually, a pull request may be made to have one's feature branch reviewed before it is merged with the master or development branch. The workflow adopted usually depends on the unique preferences of the team lead and other team members on a project.

Top comments (0)