For GIT installation you can go to GIT Download section: https://git-scm.com/downloads.
For the latest stable version for your release of Debian/Ubuntu
# apt-get install git
For Ubuntu, this PPA provides the latest stable upstream Git version
# add-apt-repository ppa:git-core/ppa # apt update; apt install git
# yum install git (up to Fedora 21)
# dnf install git (Fedora 22 and later)
# emerge --ask --verbose dev-vcs/git
# pacman -S git
# zypper install git
# urpmi git
# nix-env -i git
# pkg install git
# pkgutil -i git
# pkg install developer/versioning/git
# pkg_add git
$ apk add git
RHEL and derivatives typically ship older versions of git. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.
$ tazpkg get-install git
Go to https://git-scm.com/download/win, download should automatically start which will be of format "exe" file.
Other versions are also listed like 32 bit or 64 bit.
Install homebrew if you don't already have it, then:
$ brew install git
Apple ships a binary package of Git with XCode.
Tim Harper provides an installer for Git. The latest version is 2.23.0, which was released 9 months ago, on 2019-09-03.
If you prefer to build from source, you can find tarballs on kernel.org. The latest version is 2.26.2.
If you already have git installed and you want to update, you can get the latest by typing below in git bash:
git clone https://github.com/git/git
Initializing repository - git init
Cloning existing repository - git clone https://github.com/tekgainers/tekgainers-tut.git
Check status of your repo - git status
Add files - git add HelloWorld.java
Commiting your changes - git commit -m "Task 1: I am the message for this commit"
View commit history - git log --since=3.weeks
List remote servers - git remot, append -v to get the URLs to which they point.
Pushing to remote repo - git push <remote> <branch> e.g., git push origin master
Create a new Branch - git branch <branch-name>
Switch branches - git checkout branch-name
Merging to master - git checkout master git merge <branch-name>
List current branches - git branch
Fetch new code on remote - git fetch (this will not do automatic merging)
Fetch new code and merge in current branch - git pull
Thanks for reading and as our mission is "Sharing Technology", please do share this with your team-mates.