Monthly Archives: April 2018

Moving a git repository to new server

If you want to move your git repository from one server to another or say from to or from your own server to another server, follow below steps to transfer your repo.

Step 1 – Create a bare clone  of your existing git repository

Step 2 – Now cd into the newly created directory ‘your-existing-git-repo-link.git‘  and fetch all branches

Step 3 – We have all the branches on our local machine, lets push it to new server

That’s it, you have shifted your git repo.

Migrating your website using rsync to a new server

Moving a website having large number of files from one server to another can be a can be a daunting task. If you are not using any version control like Git then you need to first download the whole application on your local computer and then upload to the designation server.
This is a time consuming process considering the number of files. So in this post I am going to tell you a much faster approach to tackle this problem using a utility called ‘rsync’.
Install Rsync
Run this command to check if it is already installed on your machine,
If you see something like then it is already installed on your machine

You need to install it if it the output is blank.

To install Rsync on your machine

Now to communicate between your old VPS and new VPS we need to have Rsync installed on your old VPS as well. So log into your old VPS and check if Rsync is installed on it, if not then follow above step to install it.
Rysnc needs to be able log into your new server from your old server to transfer files. Run below command to generate a key, if you do not have one generated already.

Lets transfer the key from your old server to new one through below command
Now you are ready to start transfer of files from your old VPS to new VPS, log into your old VPS and enter below command
in the above command
my-project = is the directory that you want to transfer
190.201.303.404 = destination VPS IP address
/var/www/html/my-project = path where you want to store the files on destination server.
You can use –progress option to see the progress.

React Native showing default screen even after code modification

If you are building a React Native application for Android by running

and you are still getting the default React native screen,

follow below steps to fix this issue.

1.Create assets directory in android/app/src/main

2. Clear your build cache by running below command from root of your application

3. After this run

4. Now build the application by running, you should see the changes