VERSION CONTROL SYSTEM:GIT
Sravya Nalla
Product Developer - ADP (GETS) | Area Director (E3) at District 126 Toastmasters
The platform which brings the biggest community of developers to build, share and develop Software : "GitHub".
“One of my most productive days was throwing away 1000 lines of code.”
Why GitHub?
It is providing open source repositories of projects to private repository projects.It provides us with great advantages where we can collaborate with our team which is a better way to work,we could write better code by reviewing from the pull requests,From continuous integration to code review, we could find tools for every step of the development process and start using them in minutes. Browse and buy apps from GitHub Marketplace with your GitHub account.And the best thing is about Integration, GitHub provides us many built in web-hooks bringing more control over what we build.There's flexible hosting and secured through Protected branches, signed commits, and required status checks protect your work and help you maintain a high standard for your code.
"Don't hurry your code. Make sure it works well and is well designed. Don't worry about timing"
what's Git?
Linus Torvalds, the famous creator of the Linux operating system kernel developed this version control system.
It is designed for work management among developers with speed,integrity,security and support of distributed workflows.
It is called Version control system because git could keep track of every commit made and we could revert back every version with ease. This keeps good track of our workflows.Every Git directory on every computer is a full-fledged repository with complete history and full version-tracking abilities, independent of network access or a central server.
“Great things in business are never done by one person. They're done by a team of people.”
Characteristics of Git:
Strong support for non-linear development
Git supports rapid branching and merging, and includes specific tools for visualizing and navigating a non-linear development history. In Git, a core assumption is that a change will be merged more often than it is written, as it is passed around to various reviewers. In Git, branches are very lightweight: a branch is only a reference to one commit. With its parental commits, the full branch structure can be constructed.
Distributed development
Git gives each developer a local copy of the full development history, and changes are copied from one such repository to another. These changes are imported as added development branches and can be merged in the same way as a locally developed branch.
Compatibility with existent systems and protocols
Repositories can be published via Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), or a Git protocol over either a plain socket, or Secure Shell (ssh). Git also has a CVS server emulation, which enables the use of existent CVS clients and IDE plugins to access Git repositories. Subversion repositories can be used directly with git-svn.
Efficient handling of large projects
fetching version history from a locally stored repository can be one hundred times faster than fetching it from the remote server.
Cryptographic authentication of history
The Git history is stored in such a way that the ID of a particular version (a commit in Git terms) depends upon the complete development history leading up to that commit. Once it is published, it is not possible to change the old versions without it being noticed. The structure is similar to a Merkle tree, but with added data at the nodes and leaves.
Toolkit-based design
Git was designed as a set of programs written in C and several shell scripts that provide wrappers around those programs.
Pluggable merge strategies
As part of its toolkit design, Git has a well-defined model of an incomplete merge, and it has multiple algorithms for completing it, culminating in telling the user that it is unable to complete the merge automatically and that manual editing is needed.
Important Git commands :
git config
git config –global user.name “[name]”
git config –global user.email “[email address]”
git init
git init [repository name] #used to start a new repository.
git clone
git clone [url] #used to obtain a repository from an existing URL
git add
git add [file] #adds a file to the staging area.
git add * #adds one or more to the staging area.
git commit
git commit -m “[ Type in the commit message]” #records or snapshots the file permanently in the version history.
For more Git Commands: Git Cheatsheet
“Good code is its own best documentation. As you’re about to add a comment, ask yourself, ‘How can I improve the code so that this comment isn’t needed?'”
Gitkraken:
It is One of the best GUI for Git.
GitKraken is built with NodeGit, a Git framework that is primarily developed and maintained by members of the GitKraken development team. It is built on an open-source framework, Electron, but it is not open-source.
It doesnot install git but Git tools are required for GitKraken, so once you've run the installer, you can open the app and get going.
You can get GitKraKen from the below link:
?Experiment,Fail,Learn.......Repeat!