Push Data To Github Repository Server on Redhat/Cent0s 7

Push Data To Github, Git is an Open-source Version Control system keeps the track of files changes among People. GIT gives you very fast Performance as compared to SVN. It also can work offline. You can commit changes in offline, Even if your git server is down.

Push Data To Github Repository “ on Redhat/Cent0s 7:

You can make your own GIT server and You can also use github.com for keeping your files but it’s only for the public repository.

Check Out: How To Change Gitlab Backup Path Location

Note: if you want to keep your files privates, So you have to pay for it. 

For more details visit Git Docs

Let’s check git is installed or not

rpm -qa git

Install GIT Server on your local machine

Check Out: How To Check Logs In Git

yum install git -y

Now make a GIT repository 

mkdir repeat

This phase will initialize GIT

Check Out: How To Reset Gitlab Root Password

git init

You can check by running the below command

ls –a

See GIT configuration files here

cd .git/

Create a file

Check Out: Redirection HTTP to HTTPS in Gitlab

touch abc

echo "this is my first git setup" > abc

Check status, ?? Means you have just created files not added in GIT

git status –s

Add file to GIT  repo

git add abc

“A” Means files have been added and it’s in the staging area

Check Out: LDAP Authentication With Gitlab Server

git status –s

Now run a commit command

git commit -m "first commit"

You can Check who committed the changes

git log

Create a username and email for a user to recognize who worked on the files.

git config --global user.email “abc@yahoo.co” && git config --global user.name "TOM"
echo "i repeat the step" > abc

For testing, you can commit again

git commit -m "second commit"

git log

Check Out: How To Merge Branch In Git On Gitlab

Now we will push the data to the centralized GitHub, log in to your account on https://github.com

Here you will have to add remote GIT repository/Server where all the data will be saved

git remote add origin git@github.com:Aryango/publicrepo.git

Push the data to the centralized GIT Server.

git push origin master

Your data is saved on the GitHub repository.

YouTube link: Data To GitHub

That’s it.

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment