We will install git on our server to initiate a git repository in the app's directory. If you already have git installed, you can skip to the git repository initiation steps.
To install git on the server, connect to the VPS as the root user using Terminal and run the following command:
1. In a Terminal window, connect to the VPS as the single user (not root):
2. Change directories to the new app's home directory:
3. Initiate a git repository in this directory with the following command:
4. Configure the global username for the new repository:
5. Configure the global email for the new repository:
6. Add all of the current files in the directory and sub-directories to the repository:
7. Commit the addition of the files to the repository with a commit message:
Previous post: Creating the new Rails app on the web server
Next post: Configure the app's database file
Install git on the server
To install git on the server, connect to the VPS as the root user using Terminal and run the following command:
# yum install -y gitInitiate git repository
1. In a Terminal window, connect to the VPS as the single user (not root):
$ ssh username@example.com2. Change directories to the new app's home directory:
# cd /home/username/public_html/test-app3. Initiate a git repository in this directory with the following command:
# git init4. Configure the global username for the new repository:
# git config --global user.name "Your name"5. Configure the global email for the new repository:
# git config --global user.email youremail@email.com6. Add all of the current files in the directory and sub-directories to the repository:
# git add .7. Commit the addition of the files to the repository with a commit message:
# git commit -m "Initial git commit"Previous post: Creating the new Rails app on the web server
Next post: Configure the app's database file
No comments:
Post a Comment