My experience on my daily works... helping others ease each other

Friday, May 29, 2020

Solving Committing Issue between R Studio and Github


Solving Committing Issue between R Studio and Github

In the normal development process, you will create a repo (the repo in this article is located at Github), followed by the cloning process or download as full directory into your localhost. It is much easier and straightforward. There won’t be any issues especially if your scrum master or release manager is a well trained person in handling branching, merging, and releasing code using git.


However, in most cases, especially for a full-stack developer who did everything on its own, you may encounter an issue if:

  1. You created a project in your localhost first using R Studio and set Git as your SVN through your project setting
  2. Then you created the repo at the GitHub
  3. Finally, upon ready, you run command to sync with your GitHub

The following is the command that you use/execute and the result of running the command:

% git remote add origin [your GitHub report url]
% git pull origin master
warning: no common commits
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From [your GitHub report url]
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
fatal: refusing to merge unrelated histories

and you see the last sentence .. ERROR


Then, based on google, you followed with the following command

% git push -u origin master

and you get the following response (or similar)

To [your GitHub report url]
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘
[your GitHub report url]'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push — help’ for details.

Next, you try to pull again to get the latest branch based on the previous error by running the command to pull again

% git pull origin master

And the result is still not promising 
From [your GitHub report url]
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories

What are you missing or wrongly done? I won’t be able to tell you the missing or wrong steps, but I’m sharing your step to overcoming the problem.


STEPS

  1. Go to you localhost directory where you created the project
  2. In that directory, you should find a file name .gitignore & folder .git
  3. Delete both by running rm -fr (if you are using windows, the command might be different)
  4. Next, init your project file again by running the command git init. You shall see the following message appear after executing the command — Initialized empty Git repository in [your project path]
  5. Followed by adding the remote repo by running the command git remote add origin [your GitHub repo url]
  6. The followed by git add . (make sure there is ‘.’ at the end of the command). It tells the git to add all directories in the remote repo to your local.
  7. Followed by git pull origin master. If succeed, you shall be able to see the following result:
    remote: Enumerating objects: 3, done.
    remote: Counting objects: 100% (3/3), done.
    remote: Compressing objects: 100% (2/2), done.
    remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
    Unpacking objects: 100% (3/3), done.
    From [your GitHub repo url]
    * branch master -> FETCH_HEAD
    * [new branch] master -> origin/master
  8. Finally, run git push -u origin master to verify again. You shall see the following result to indicate it is successfully integrated between your local repo and your Github repo and R Studio shall be able to interact perfectly with GitHub.
    Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’. Everything up-to-date

Once you have done all the steps, go ahead to your R Studio and perform Stage -> Commit -> Commit Message -> Push to complete the process. Refresh your Github page and you shall see all of your local files at your GitHub repo.

If you find this useful, you can buy me a coffee :) @ https://www.buymeacoffee.com/masteramuk

Share:

Monday, May 25, 2020

Solving Internet Router Problem - TM Unifi NETIS DL4480V

TM Unifi NETIS DL4480V Connectivity Problem

After a while, the NETIS DL4480V router provided by TM upon subscribed to TM Streamyx (or TM Unifi lite) will fail to work properly. Your internet connection may be up and down or worst the router itself will frequently disconnected or restart.

Before that happen, in case you need to reset your router, Please DO NOT go to https://easyfix.unifi.com.my/ or https://easyfix.unifi.com.my/reconfigure_wifi_netis

It is useless (worth to try but it won’t be helpful enough).

You can even call their call-center line at 100 and the best guidance you can get is just to confirm your username and password again and resetting your port. It may work or may not work at all. If it works, you still need to tweak on your own (or worst, wait for their technician to drop by, which may take 1, 2, 3 days or even week after you file your report unless you keep bugging them via SOCMED or phone call if you are in dire need of internet connectivity).

Why I stated that you need to tweak on your own. This is because the technician will only install and use the basic setting to set up your router. They won’t do extra miles to ensure that your internet connection is superb. There are a few things you can do to improve your internet connection. Before that, let us do simple tweaking and have a stable connection first.

There are few links here that might help you in tweaking it (IF it still able to connect to TM Switches PERMANENTLY, but failed to connect to any website).

1. https://www.youtube.com/watch?v=CX0PXujZbAs
2. https://www.youtube.com/watch?v=Awf4RK5z-V4&app=desktop
3. http://hotspotsystem.com.my/index.php?route=pavblog/blog&blog_id=209

Well, that shall do it. If the problem persists, just get them to send the technician ASAP and request to change the router. This might be the core problem of failure like mines. That’s it… or you can buy your own router and make sure it is VDSL2 (for unifi/fiber) ya.

The final step is to tweak a little bit more to have a better connection. You may not be needed if you think yours is working fine.

1. Disable some of the security features. Please, do this IF you are using it for your OWN purpose and not to setup for openly accessible wifi. You may disable firewall, IDS, IPS setting or tweak it to your own need. To do this, you need to login to your router page at 192.168.1.1 and go to security section (normally at Advance tab)
2. Change the DNS (from automatic to manual) and follow the following few links

Adios

TM Unifi NETIS DL4480V Connectivity Problem

Share:

About Me

Somewhere, Selangor, Malaysia
An IT by profession, a beginner in photography

Blog Archive

Blogger templates