Basic Git commands for beginners

Hello everyone!!

I am Nirbhay Parmar and I am a learning web developer. In this post I will be explaining some basic Git terminologies which is useful if you are entering into development field or want to contribute in any open source project on Githu…


This content originally appeared on DEV Community and was authored by Nirbhay Parmar

Hello everyone!!

I am Nirbhay Parmar and I am a learning web developer. In this post I will be explaining some basic Git terminologies which is useful if you are entering into development field or want to contribute in any open source project on Github.

Now the first question arises from this introduction is that what is Git and why should I even care about it? Some of the beginners are also confused between Git and Github. So let me explain the Git first then I will explain about Github after it.

Git is a version controlling software. It is used by developers for maintaining different versions of any project they are working on. In an ongoing development process there are many developers working on a single project. They are working with one or two features of that project. So they need a system that can keep track of the changes and commits made on a project and if someone broke the code while experimenting on any feature then there should a way to reverse that faulty code. So Git does the same. Git keep track on files and code used in a project and give a way to make different versions of same projects called "branches" to experiment without worrying about breaking the code.

Now what is Github? Github is a place to store your code or your repository online to share it with your team or online. All open source projects are on Github and any who knows how to code can contribute to it. Another such service are Bitbucket and Gitlab.

Now some basic Git commands-

  1. Git init - Git init is used to initiate a local git repository. It is first command whenever we want to use git.

  2. Git status - It shows the status of the working tree. Git status is used to show the changes made, any newly created file that is not added to repo.

  3. Git add - As the name suggests it used add new files and folders to git.

  4. Git commit - It is used to save changes to the repository.

  5. Git clone - It is used to setup a local git repo using any other remote git repo hosted on Github or Bitbucket.

  6. Git push - It is used to push commits to your remote repo.

  7. Git pull - It is used to fetch changes made by others to remote repo to your local repo.

So these are some common Git commands which we can use in your projects.

There are so many other commands which I will discuss in upcoming parts of this series.


This content originally appeared on DEV Community and was authored by Nirbhay Parmar


Print Share Comment Cite Upload Translate Updates
APA

Nirbhay Parmar | Sciencx (2021-07-28T15:50:55+00:00) Basic Git commands for beginners. Retrieved from https://www.scien.cx/2021/07/28/basic-git-commands-for-beginners/

MLA
" » Basic Git commands for beginners." Nirbhay Parmar | Sciencx - Wednesday July 28, 2021, https://www.scien.cx/2021/07/28/basic-git-commands-for-beginners/
HARVARD
Nirbhay Parmar | Sciencx Wednesday July 28, 2021 » Basic Git commands for beginners., viewed ,<https://www.scien.cx/2021/07/28/basic-git-commands-for-beginners/>
VANCOUVER
Nirbhay Parmar | Sciencx - » Basic Git commands for beginners. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/28/basic-git-commands-for-beginners/
CHICAGO
" » Basic Git commands for beginners." Nirbhay Parmar | Sciencx - Accessed . https://www.scien.cx/2021/07/28/basic-git-commands-for-beginners/
IEEE
" » Basic Git commands for beginners." Nirbhay Parmar | Sciencx [Online]. Available: https://www.scien.cx/2021/07/28/basic-git-commands-for-beginners/. [Accessed: ]
rf:citation
» Basic Git commands for beginners | Nirbhay Parmar | Sciencx | https://www.scien.cx/2021/07/28/basic-git-commands-for-beginners/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.