What is Git?
git is a distributed version control system or decentralized version control system that records changes to a file or set of files and what that means is that many developers can work on a single project without having to be on the same network.
having version control permits you to track what you worked on what your friends are working on so you do not conflict the changes and you don’t overwrite each other’s changes and even if you do work on the same files the version control system will tell you that you’re going to overwrite your friends’ changes don’t do that” or if you want to take a look at like you want to control how it merged together you can do that so you can’t do anything without version control that is the reason why we use version control is to allow us to work together and collaborate inefficient manner.
Concepts of Git:
- Takes “snapshots”of your files.
- Keep track of code history.
- Can check any snapshot at any time.
- Can stage files before committing.
Git is generally used for each open source and commercial software development, with great advantages for individuals, teams, and businesses.
- Git lets developers see the complete timeline of their changes, decisions, and development of any project in one place. From the moment they get right of entry to the history of a project, the developer has all the context they want to understand it and start contributing.
- Businesses using Git can break down communication boundaries between teams and maintain them focused on doing their best work. Plus, Git makes it viable to align experts throughout a business to collaborate on main projects.
To use Git, developers use particular commands to copy, create, change, and combine code. These commands can be completed directly from the command line so Here are some common commands for using Git:
- $git init
//initialize a local git repository.
- $git add<file>
//add files to index.
- $git status
//check the status of the working tree.
- $git commit
//commit the change in the repository.
- $git push
//push to the remote repository.
- $git pull
//pull latest from remote repository.
- $git clone
//clone repository into a new directory.
What is GitHub?
GitHub is a web-based web hosting service for version control using Git. It gives all of the distributed version control and source code management (SCM) performance of Git as well as includes its own features. Also, it gives access control and several collaboration features such as bug tracking, feature requests, and project management.
- Easy project management: GitHub is one place where project managers and developers coordinate, track and update their work so projects stays transparent and on schedule.
- effective team management:So team members can stay updated with all that’s happening on the project so this helps them in staying organized and well coordinated the pull request and modification tools make sure that the team members focuses on the code.
- Safty packages: The packages can be published privately or with in the team or publicly for the open source community. the packages can be used or reused by downloading it from GitHub.
- improved code : with the help of github the quality of code has significantly increased now with the help of git pull command one can review ,improv&,propose new codes along with that suggestions & modifications may be discussed before changing the original code
A repository is used to organize a project. Repositories contain a collection of files and folders associated with a project. repositories are self-contained units and absolutely everyone who owns a copy of the repository can access the whole codebase and its history. Using the command line or different ease of use interfaces, a git repository also lets in for: interaction with the history cloning, developing branches and committing, merging, comparing modifications throughout versions of code, and more.
How to create repository ?
- In the upper-right corner of page, select + new repository.
- Type a memorable name for your repository.
- Add description of your repository.
- Choose a repository visibility.
- Select initialize this repo with README.
- Click create repository.
Differences between Git and GitHub
How to use GitHub effectively?
- Start use of git regularly.
- Upload your projects.
- Make connection on github.
- Share github profile on social media.