How To Run A Github Repository? - sql

I'm a coding newbie, so this may be sort of a dumb question. I was working on an SQL project to learn the language and I wanted to know if there was a way to download and execute a Github repository, I haven't used Github before. Thanks!

If you are a newbie, I think you should learn how to use git.
You can refer the link below: https://education.github.com/git-cheat-sheet-education.pdf
Basic steps:
Clone or download source code from Github.
You can download it directly, or use a tool like Git-bash, tortoise git...
Run this source code, depending on the language of the source code.

In order to run any code in a Github repository, you will need to either download it or clone it to your machine. Click the green "clone or download repository" button on the top right of the repository. In order to clone, you will need to have git installed on your computer. Then, follow these instructions. You could also just click download. Once you have it on your machine, how you run the code will depend on what type of code your project is written in.

I'm assuming that you found a repository relating to SQL on Github that you want to run, the best thing to do is to scroll down and read about that repository I'm sure most of the time there are instructions there on how to install or run the repo and from there if you don't understand something try Googling that keyword I'm sure Google has an answer for that and also best way to learn.

If you use codesandbox you can import and export from it to github. So, when you go to codesandbox, the very left bar, click on the rocket (deployments) and deploy to Github (pages). But I'm sure there must be a way to also do it from github via github actions, but I couldn't figure out either

You cannot directly run the code because it only can run based on specific environments like using python. Instead of using git to clone the code, you could download the code zip file through the code button on the github project.

Step 1:
Open GitHub and navigate to the main page of the repository.
Step 2:
Under the repository name, click on Clone or download.
Step 3:
Select the Clone with HTTPs section and copy the clone URL for the repository. For the empty repository, you can copy the repository page URL from your browser.
Now just go to your Ide(editor) and open terminal just enter the below command, click to Enter.
command : git clone [url]
$example -> "git clone https://github.com/ImDwivedi1/Git-Example.git"
Now you can see folder has been created in your directory.

Related

Need a way to update two gitlab repositories through single intellij project window

I am working on a project which is hosted on a particular gitlab repository. Often we dont get to connect to this repository because of network issues. Hence I have created my own local gitlab repository.
Now to keep the both repositories updated, i have to copy paste the code from one folder linked to one repository to other folder which is linked to other repository.
Is there a way in intellij wherein i can work in the same window but when committing and pushing the changes, both the repositories get updated at the same time ?
Regards,
Thanks in advance
Personally, I think it is far, far easier to use Git from the terminal/powershell.
If you are interested in using the terminal, or powershell, with Git, and want set multiple remote origins, then there is a already a detailed answer about pushing and pulling from multiple remote locations.
Otherwise, look at Intellij's VCS menu, then select "Git."
Then select "remotes":
Then get add your other Git remotes by clicking "+" and add:
Add you should be set. Just select which remote you would like to push to.

Rally - clone existing app

I'm trying to create a custom release burnup app for my group. There is an existing app called 'Release Burnup' in Rally, and based on the instructions for rally-app-builder I thought I would be able to clone this app as a starting point.
However, when I use the rally-app-builder clone RallyApps ReleaseBurnup command, it doesn't seem to do anything except change the title in the output html files to "Son of ReleaseBurnup". When I tried the same thing with the example from the github page (which uses rally-app-builder clone RallyApps StoryBoard) then it seems to be successfully cloning an app, with updates to the App.js file, etc.
I'm guessing that I might be using the wrong name to clone, but I'm not sure how to know what names are valid for this command to clone the app I want.
Unfortunately rally-app-builder clone functionality predates newer developments and the availability of source code of catalog apps from RallyApps/app-catalog, so it does not support drilling down those directories.
clone RallyApps StoryBoard works because there is a StoryBoard app at that location. There is no ReleaseBurnup there. ReleaseBurnup code is not available.
Here are the steps to build an app from javascript source files from GitHub app-catalog repository
Prerequisites:
Node.js
rally-app-builder
Get the source to a local directory (you may either fork the
app-catalog repo, or download zip from the same location):
in terminal, cd to the directory of the app you want to work on, and call this command:
rally-app-builder build.
As a result a deploy folder is created with App.html and
App-uncompressed.html inside, and App-debug.html is created in the
root folder of the app.
These steps make sense only if you intent to customize the catalog app and want to use the source as basis. If you want to use a catalog app as it was designed, install the app directly from the AppCatalog as described in this help document.

Download the project from Trac?

I want to download this project: http://trac.sitecore.net/AdvancedDatabaseCrawler/browser/Branches/v2/
How should I download the whole project?
If you go up a couple levels (I just removed parts from the URL until it worked), you get this:
The project code and documentation has been moved to the following location:
​https://github.com/sitecorian/SitecoreSearchContrib
The codebase will not be maintained here any longer.
So, go to the new URL on GitHub and grab the git URL (git://github.com/sitecorian/SitecoreSearchContrib.git), then either use git:
git clone git://github.com/sitecorian/SitecoreSearchContrib.git
Or paste the URL into a git tool.

"Bare" git repository: how can I let Apache always "see" the latest commit?

We've got a "bare" git repository on a server, for a Web portal project. Several programmers, designers, etc... perform dozens of push and pull from/to it.
Now we want to test the project on the server itself, and always test the last commit through an Apache web server which is installed on the same machine the "bare" git repository is stored in.
How can we 'unbare' the repository, and let the working directory contain always and only the last commit deriving from the last push?
Or anything else aiming to achieve the same result?
You can use a post-receive hook to do a git pull inside your webserver document root/repository.
in your bare repository
do
mv hooks/post-receive.sample hooks/post-receive
chmod +x .git/hooks/post-receive
the post receive should be something like
#!/bin/sh
WEB_ROOT='/var/www/project'
cd $WEB_ROOT
git pull
A more elegant solution that doesn't involve that the web server area being a git repository, you can also review the git documentation about hooks
Note: if you use the simple solution, please make sure that your webserver doesn't serve the .git directory, this would give some hackers/crackers the access to the website source code!

Using Github & Unfuddle at the same time

Is there a way to use Github and Unfuddle for the same repo? I am responsible for a repo hosted at Unfuddle, but I am not the main owner and it's private because it's part of an ongoing project. I still need to update the repo there when changes are made, but I would like to use the same set of files to create and update a public Github repo associated with my own account, is that possible? The reason I want to use the same files is that it's a WordPress plugin and it needs to be tested before I commit changes, therefore I need to use one set of files to not complicate the matter. Any help would be appreciated.
You can set up both the repositories as remotes and push/pull to and from both of them; Git is decentralized and thus doesn't really care about whether you have one remote or many.
http://www.kernel.org/pub/software/scm/git/docs/git-remote.html
Example:
git remote add github git#github.com:username/reponame.git
and then...
git push github <branchname>
git pull github
git log github/<branchname>
etc...
Create your github repository, then from your Unfuddle local repository, run:
git remote add github git#github.com:YourUsername/YourReponame.git
Where YourUsername is your github user name, and YourRepository is your repository name. After setting up the github repository, the above URL with the user name and repository name filled in, should appear on your github repository page anyway.
Everything works like you'd expect, for example, pushing:
git push github
Your settings for the Unfuddle repository will work like before.