How to add your Project to Version Control – Part: 3
Clone Github on your Ubuntu Server :
1. Login on your Ubuntu server.
2. Go to your project folder (My Project folder path is /var/www/html). Run following command to take a backup if require.Backing up all your files of current folder directory, including sub directories .
>/var/www/html>tar cvf /var/www/< mybackupfilename> *
Verify GIT is available or not on your server:
Follow step :1 If Git not available on your server ? Else go to Step:2 directly
We will get following error message when you execute git clone command with out GIT.
To run ‘git’ please ask your administrator to install the package ‘git’:
Step:1 – Install git
>sudo apt-get install git
>git clone <Clone URL> . //clone URL <space> [dot]
Enter Username & Password:
Done. Your project setup is done.
Note: Default branch is master. After done the setup, go and verify your website is working as expect or not on the browser. If not then check all your files & folders are committed properly in git. Some times few of the files (or) folder may not committed to the git. This might be because of your .gitignore file. Now you have to check .gitignore file. Is there any restriction is done for folder & files . For timing remove those restrictions from .gitignore file & revert once after successfully complete your git process.