Install Git on CentOS 6

Install Git on CentOS 6

Install Git on CentOS 6

if you need version control, and code management system (possibly because of issues with developers breaking things ), then Git is your “go-to.” You should also be aware that Git was designed by Linus Torvalds, the creator of the Linux kernel, specifically for Kernel Development (but can be used for many other things)

Let’s get started, login and su to root

Root shell prompt on the CentOS-Base server

install the EPEL repo

yum install git, shown where the step says to install the EPEL repository

now let’s install git

yum install git typed at the root prompt

in this case we need to make a repo for a Production Website (edit the username for what you want)

mkdir /home/username/PRO-WEBSITE to create a directory for the repository

change to that directory

cd /home/git/PRO-Website to change into the repository directory

from here we need to start/initialize git

git init: Initialized empty Git repository in /home/git/PRO-WEBSITE/.git/

now create a file in that directory

git add . in PRO-WEBSITE, shown where the step says to create a file

add all files to Git repo

git add . to stage all files in the PRO-WEBSITE repository

now commit the changes

git commit typed in the PRO-WEBSITE repository

add a comment

git commit message editor: added by Zwiegnet Linux Admins 7/12/2013, new file LinuxIsBetterThanWindows.txt

bam! committed!

git root-commit output for LinuxIsBetterThanWindows.txt with the git config user.name and user.email hint

That’s it! You have successfully configured Git. Enjoy!

To get a hosted Linux Box visit www.zwiegnet.com/go to get started today!

Related guides: Install RPM Package on CentOS Linux | Build RPM From Source

Leave a Reply

Your email address will not be published. Required fields are marked *