“Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency”. This is according to the official git website. In a nutshell, git is distributed version control tool to be utilized while coding and managing a software project versions and releases. -Founder: Git was founded and created by Linus Torvalds, in 2005 for development of the Linux kernel with other developers contributing to its initial development.
How to use Git:
Git can be downloaded from its official website, where you will choose the setup compatible with your operating system. Upon Installation, you can then choose to be using git from command line interface called “git bash” or graphical user interface called” git GUI”. It is then used with other online code repositories and version control platforms like GitHub, GitLab or Bitbucket. -Popular Git Commands: • git init: create a new Git repository • git clone: clone a repository • git status: show state of current directory • git log: list the commit history • git diff: difference between working directory and index • git show: display the content and metadata • git branch: list all branches in the repository • git checkout [branch]: switch to a branch • git branch -d: delete a branch • git branch -m: rename a branch • git merge [branch]: merge the specified branch • git add [file]: stage changes • git add . : stage everything • git revert [file]: undo changes • git clean -n: show untracked files • git commit - -amend: replace the last commit • git remote add: connection to a remote repository • git pull: fetch a repository • git push: push a branch • git config - - global: user.name: define the author name to be used • git reset: reset staging area to match most recent commit • git fetch : fetches a specific branch from the repository. Happy Coding!