Adding private git repo via cPanel

CLONE GITHUB REPOSITORY TO CPANEL STEPS steps 1. Cpanel -> SSH Access -> Generate New Key(without enter pasword)->after generated key go to under public key-> manage-> authorize (make authoize) -> back, now view/download-> copy key Step 2. Go Github-> https://github.com// -> Settings(repository setting) ->Deploy Keys (rights side)-> add deploy key (give title,and add key)-> done … Read more

How to fork a branch and not the repository?

In github (and in git’s mental framework) you clone and fork repositories. There’s no way to fork a branch; that doesn’t make sense. Just fork the project, and work off the branch you’re interested in. You don’t lose anything by doing so. “Working off a branch” usually means you clone a repository (e.g. git clone … Read more

How to use GitHub V3 API to get commit count for a repo?

Make a request on https://api.github.com/repos/{username}/{repo}/commits?sha={branch}&per_page=1&page=1 Now just take the Link parameter of the response header and grab out the page count situated just before rel=”last” This page count is equal to the total number of commits in that branch! The trick was to use &per_page=1&page=1. It distributed 1 commit in 1 page. So, the total … Read more

Amend username for a pushed commit on Github

The already pushed change, if people have pulled it, is something you’ll have to live with. If no one’s pulled it (i.e. you realize your mistake right after pushing), you can amend your commit: git commit –amend Make sure you don’t add any new changes to the commit – don’t use -a, don’t use git … Read more

GitHub GraphQL equivalent of the contents API

After some digging, found it: query { repository(name: “repoName”, owner: “repoOwner”) { object(expression: “branch:path/to/file”) { … on Blob { text } } } } The argument passed to expression on the object field is actually a git revision expression suitable for rev-parse, so I guess you can have fun with it to do advanced querying. … Read more

Git Compare files before commit

Of-course you can do. Using git diffcommand without any arguments: will compare each modified files in your file system against the files in the current checked-out branch (or) tag. Using git diff <tag(or)branch name>: will compare each modified files in your file system against the files in the specified branch (or) tag. Using git diff … Read more

fatal: unable to access “…..”: gnutls_handshake() failed: Handshake failed

This is solution fix this issue on ubuntu server 14.04.x 1, Edit file: sudo nano /etc/apt/sources.list 2, Add to file sources.list deb http://security.ubuntu.com/ubuntu xenial-security main deb http://cz.archive.ubuntu.com/ubuntu xenial main universe 3, Run command update and update CURL to new version apt-get update && apt-get install curl 4, Check version (Optional): curl -V Response : curl … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)