Git is a Version Control System (VCS) probably known and used by all programmers nowadays. It uses for managing your projects, files, and changes much easier and more intuitive. But, as it's a big and complex system, people new to programming can have a hard time learning it.
In this opportunity, I want to share my experiences using all basic commands which I still used until today.
Lets start
git clone
This is the first command we will use when we want to make some improvements or creating changes in some projects. This command will copy the project to our local/machine.
git branch
We use this command when we want to check which branch we are in right now.
3 Important Commands
Next, those are 3 commands which we used sequentially because of the condition and the nature of the command. As long as we worked with Project with GIT, we will use them. Those are git add
, git commit
, and git push
.
Below I will elaborate more how to use them.
git add
After we already satisfied with the changes we made, We can add all the changes we made to our remote repository. we can use this command to verify, choose, and mark which changes to be pushed to our remote repository.
git commit -m <your_commit_message>
When you want to commit, we need to input a message about a commit we make. Usually in this part, we will describe or elaborate the changes we created in this commit. So our team can know and get the context about the change we created.
git push
After we verify with git add
, commit the changes with git commit
, Next with this command, we can push our changes to the remote repo so the changes we made will be updating our remote repo.
Some Thought
You can follow this tutorial now and can start contributing to some simple projects. All the steps above can help a person who wants using GIT immediately without knowing too much detail for what the GIT itself.
Next, I will cover how to use GIT if we have something to do in the middle of the project. I will create this tutorial in 3 parts. So follow this tutorial until the end.
I think that's what I want to share right now for this article. Leave a comment below about your thoughts! Thanks.
Top comments (0)