Lets GIT it!
By: Inez Nabila
Tags: Git Manual, Git, Repositories

“Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning-fast performance.”

Git is one of the mainly used version control, well known to everyone in the Computer Science field.

Photo by Pankaj Patel on Unsplash

What is Git?

Git is a version control system. A system made to make team coding easier to collaborate in and to make it easier for personal use too, especially for deployment purposes.

At first, git might seem confusing. But really, git is very useful for developers to create repositories of the codes that they are making!

If you’re new to Git, do not fret! There are numerous amount of free resources to learn git online and Git has a really easy to understand instructions on its page.

Why Git?

In Git, developers could make branches for each of their own creations. For example, my team is making a website for admin and I am in charge of the login API, so then I will make a branch named “PBIName-MyName” And for every change I made, I can save it in the Git.

Each different changes we made to the repository will be tracked and saved into the commit history of the repository

the name, date of the commit and what is changed in the commit could be seen

It makes it easier for developers to know what changes had been made to the repository.

GIT Manual

First, we need to introduce ourselves in Git so that your teammates will know who you are!

$ git config — global user.name “Your Name Comes Here”

$ git config — global user.email you@yourdomain.example.com To initialize a new project, you can write

$ cd project (to the project you want to go to)

$ git init (init here is an abbreviation of initialization) if we want to download on a currently ongoing (already established) repository, instead of establishing our own project, we can do this command

$ git clone <the https link of the repository> Then, to know which or whose Git version you’re on (branch) you can simply write this command

$ git branch To add your own changes to the current version you are seeing, you can do these steps :

$ git add <filename or ‘.’ (. means all changes)>

or even

$ git add file1 file2 file3 After adding the files, you can commit the files by doing

$ git commit -m “commit message”

the commit message must be clear on what you are adding or doing so that people will know what you changed without having to check each file one by one. Or if you have not done

$ git add .

you can simply commit and add at the same time by doing

$ git commit -a “commit message” then we can push the changed files to the branch (or version of the code) that we want by writing the command

$ git push origin <branch name> To look at the commit history by using the terminal, we can run the command

$ git log

“clone with https”

here, I am in the branch “master”

for more in-depth information, you can check https://git-scm.com/docs/user-manual

Conclusion

Git is a very useful version control which is fairly easy to use! It has numerous functions that is very useful and great.

Let’s GIT it!