In the world of programming, you would have come across the terms Git and GitHub.
If not, you are still in the right place! This blog will help you expand your knowledge about the programming world.🌎
What do these stand for? Are these both the same? What can one do with these? 🤔
These questions would have crossed your mind when you hear the terms GIT and GITHUB. Read along to know the answers to the above questions. 🙌
What will be covered in this article:
- What is Git?
- Why Git?
- Basic Workflow of Git
- Git Commands
- Git Extensions
- Pros and Cons of Git
- What is GitHub?
- Pros and Cons of GitHub
- GitHub Features
- Git vs GitHub
- Conclusion
What is Git?
Git was created by Linus Torvalds in 2005.
It’s a free and open-source distributed version control system that allows users to track changes in files over time while also allowing different users to work on the same project at the same time.
Why Git?
Free & Open Source:
Git was released under GPL(General Public License) open source license. It is free over the internet. We can manage our projects by git. Moreover, as it is open source, we can download its source code and also perform changes according to our requirements.Security:
Git uses SHA1(secure Hash Function) to name and identify objects within its database. It ensures that it’s impossible to change file, date, and commit message, and any other data from the git database without knowing Git.Backup:
The chances of losing data are very rare when there are multiple copies of it.
Basic Workflow of Git:
Git Commands :
- git init→ initializes a local git repository. Usage: git init [repository name]
- git add→ adds a file to the staging area. Usage: git add [file]
- git commit→ records or snapshots the file permanently in the version history. Usage: git commit -m “Type in the commit message”
- git merge→ merges a branch to an active branch. Usage: git merge [branch name]
- git push→ uploads local repository to remote repository. Usage: git push [variable name] master
- git pull→ downloads content from a remote repository. Usage: git push [Repository name]
Git Extensions:
Many Git extensions, like Git LFS, started as an extension to Git in the GitHub community and are now widely used by other repositories. Extensions are usually independently developed and maintained by different people, but at some point in the future, a widely used extension can be merged to Git.
Other open-source git extensions include:
- git-annex: a distributed file synchronization system based on Git
- git-flow: a set of git extensions to provide high-level repository operations for Vincent Driessen's branching model
- git-machete: a repository organizer & tool for automating rebase/merge/pull/push operations Microsoft developed the Virtual File System for Git (VFS for Git; formerly Git Virtual File System or GVFS) extension to handle the size of the Windows source-code tree as part of their 2017 migration from Perforce. VFS for Git allows cloned repositories to use placeholders whose contents are downloaded only once a file is accessed.
Pros And Cons of Git:
Pros:
- Better merges than anything else.
- Logging.
Cons:
- Still some confusing merge issues.
- I would like to see a system IDEs can use that automatically notifies you if someone pushes.
What is Github?
Headquartered in California , it has been a subsidiary of Microsoft since 2018.
GitHub provides a hosting service for software development version control using Git. It provides a web-based graphical interface. GitHub is like a social networking site for developers!
Why Github?
Open-source benefits:
Open-source projects tend to be more flexible because they respond more rapidly to market demands. Closed-source programs might exist in a bubble while trying to convince a target market of its value, as opposed to being genuinely responsive. GitHub provides a community where programmers are constantly working to solve current problems and make solutions available to the public.Find Talent:
Because of the breadth of the GitHub Community, we can sometimes find programmers working on similar projects or who have skills, experiences, or a vision that offers a good fit for an organization.Easy Version Control:
Versions control on Github works much like on MS Office or Google Drive--it tracks all the changes made to your code and
who makes them. You can always review the detailed changelog that neatly hosts all of the relevant information.
Pros And Cons of GitHub :
Pros:
As a repository it's great. It houses almost all the open-source applications/code that anyone can fork and play with. A huge collection of sample codes available with problem statements across different domains make Github a one-stop location.
I use GitHub with Windows and the Git Bash is superb. It is a powerful alternative to the Command Prompt and Powershell. Allows me to run shell scripts and UNIX commands inside the terminal on a Windows PC.
GitHub integration with almost all cloud development/deployment platforms is amazing. Deploying a new application in Azure is really smooth. Just link the GitHub repositories and it's good to go. From automatic build to deployment everything is just amazing.
Cons:
Not an easy tool for beginners. Prior command-line experience is expected to get started with GitHub efficiently.
Unlike other source control platforms, GitHub is a little confusing. With no proper GUI tool, it's hard to understand the source code version/history.
Working with larger files can be tricky. For file sizes above 100MB, GitHub expects the developer to use different commands (lfs).
While using the web version of GitHub, it has some restrictions on the number of files that can be uploaded at once. Recommended action is to use the command-line utility to add and push files into the repository.
GitHub Features :
Issues: Keep track of enhancements, and bugs for your project.
Discussions: Collaborative communication forum for the community.
Code spaces: A cloud-based integrated development environment (IDE) on GitHub (Beta).
Sponsors: Invest in software that powers your world- a new way to contribute.
GitHub pages: Websites for you and your projects, hosted directly from your repo.
GitHub actions: Automate software workflows. Build test, and deploy your code from GitHub.
Organizations: Organisations are group-owned repos.
Packages: Automated and secure path to continuous integration + deployment.
Project boards: Project boards help you organize and prioritize your work.
Git vs GitHub :
Conclusion:
Now, you definitely must have an idea of what Git and GitHub is, and what one can do with them. Isn’t it exciting! Having sound knowledge about Git and GitHub and working with them efficiently is very important for any programmer interested in developing great software products.
Thank you for reading, and hope you enjoyed the article!😊
If you have any questions for us, please leave them in the comment section and we will get back to you soon!
Have a great coding journey ahead😎
If you enjoyed the article, hit the reactions 🧡 and do share it with others 🤓 ~
Written by :- Adhithi Satish Kumar, Akshara S PA , and Riddhi Gope
To stay updated whenever we post new content, follow Codezilla on:
Top comments (0)