Importing a specific folder from a GIT Erlang repository in IntelliJ - intellij-idea

IntelliJ IDEA 2022.2.2
Erlang plugin 0.11.1144
SDK: Erlang OTP 25, erts-13.0
Folder To be Imported: https://github.com/erlang/otp/tree/master/lib/common_test
I am able to import the complete project https://github.com/erlang/otp.git in IntelliJ. But, I am interested in a specific module common_test. I checked File->New->ProjectFromVersionControl, but did not find any option to clone a specific folder. Does IntelliJ support such cloning? Please let me know the procedure if available.
One option could be to clone the specific folder outside IntelliJ as explained in How do I clone a subdirectory only of a Git repository? & then import it using File->New->ProjectFromExistingSources in IntelliJ.

With Git, cloning a specific folder is a bit tricky. In fact, you can't clone only the folder, as you clone the entire repository.
What you can do is actually to use partial-clone in combination with sparse-checkout git features. See How do I clone a subdirectory only of a Git repository?
These options are currently not supported in IJ UI, unfortuantely

Related

What is the proper way to upload a Vue.js app to GitHub?

I tried uploading my files to Github, but GitHub says it's too big.
I then uploaded the content of the dist folder after building for production.
This worked just fine, but it's not very useful.
What is the proper way to upload a Vue.js app to GitHub?
What you generate (binary files which can be big) should not be versioned/pushed to GitHub.
It is better to use a local plugin which will, on GitHub side, build, tag and publish a release associated to your project.
For instance: semantic-release/github.
You can combine that with a GitHub Action, which can take that release, and deploy it on a remote server of your choice (provided it is publicly accessible from GitHub): see for example "How to deploy your VueJS using Github Actions (on Firebase Hosting)" from John Kilonzi.
For your existing dist, you should delete it (from Git only, not your disk) and add it to your .gitignore:
cd /path/to/repo
git rm --cached dist
echo dist/>>.gitignore
git add .gitignore
git commit -m "Delete and ignore dist/"
git push
What happens if I add a node module( like if I decide to add an image cropper). How can the other contributers deal with that?
You need to add the declaration of that module in your project, not version the module itself. For instance, using Vue.use.
Also: I host the app on netlify. It builds the site straight from github. But it wont be able to build the site if gihub doesnt have the dist folder...
See "How to deploy your Vue app with Netlify in less than 2 min!" from Jean-Philippe Fong: Netlify itself will build the dist (from your GitHub project sources) and publish it.
You should add a .gitignore file to the root of your directory where you can ignore files and directories.
Most typical ones to ignore are the following:
node_modules
/dist
.env
.vscode

How can I clone a CodenameOne IntelliJ project and continue working on it?

I'm using a .gitignore file that was recommended for use with CodenameOne projects (See the blog post) and have committed my project to GitHub. Now I want to retrieve that project to a new PC and continue working on it but I'm having endless troubles doing it.
Shai shared a "quick trick" workaround which involves creating a new project then copying the relevant files from a clone of the Git into it, but then it's not a proper clone of the github repo that can be worked on and then synced back up to the remote.
So what I'm asking is: what steps (and troubleshooting resouces) would I use to ensure that:
I am storing the right files to the GitHub Repo to enable success
The IntelliJ Project will work with the retrieved files
I can commit changes back to the Repo going forwards.
Sorry, I'm a bit new to juggling GitHub repos and CN1's plugin structure for Idea has me mystified (I tried merging a new project with a directory which has a clone of the GitHub repo and the CN1 plugin is disabled - can't click on it)
I resorted to using the following .gitignore (using Codepoint One with IntelliJ IDEA):
# macOS
.DS_Store
# build artifacts
/build/
/dist/
/lib/impl/
/native/internal_tmp/
/out/
# idea
/.idea/**/workspace.xml
/.idea/**/tasks.xml
*.iws
With this setting, most of the IntelliJ configs are committed, as well as some binaries: CodeNameOneBuildClient.jar, JavaSE.jar, lib/CLDC11.jar, lib/CodenameOne.jar, lib/CodenameOne_SRC.zip.
This is not optimal (the binaries don't really belong in Git and take about 40 MB combined). But this way I can clone the project on a different machine and start working right away. It also doesn't produce Git diffs on every build — but only if the libs are updated.
IntelliJ/IDEA Codename One projects are nearly identical to NetBeans Codename One project with the one major difference being the additional idea directory. Just copy that directory from a working intelliJ project and add it to the gitignore. The project should work.

After installing IntelliJ Idea, I cannot use GitHub and Git because of missing "git.exe" file

Found a reason and solution.
When I was installin Idea, git was already installed on my computer, so Idea haven't installed over existing one.
To solve this problem, fist find "git.exe" file on your computer using operating system's search.
After you've found it, go to File>Settings>Version Controls>Git (even if you're having problem with GitHub) >Path to git executable > "..." and paste the destination path of your git.exe file that you have found erlier.
If you choose not to do the full PATH (environment variable) integration when installing git (on Windows), you'll need to tell IntelliJ where to find git.cmd;, you can do this in
Settings > Project Settings > Version Control > VCSs > Git

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.

SVN under eclipse

I want to know how to cleanly create an svn project in eclipse.
I did it badly. Tell me what I'm doing wrong:
First, I copied the files up to the server.
I take all the code, in directory draw2
mkdir branches logs trunk
all the code is put into trunk
Create the directory with
svnadmin create /var/svn/draw2
Import it with
svn import ~/draw2 file:///var/svn/draw2 -m "initial import"
Using tortoise svn, I can check out a clean copy, it seems to be there.
But then I want to use eclipse.
installed Svnkit plugins
create a new project in eclipse, from svn. It downloads the project
where before, there was a src directory, now there is a trunk/src
zillions of errors.
Is there any clean way for me to just upload a project, as is in eclipse, and then check it out on other machines?
Thanks!
(1) Create project in Eclipse.
(2) Right click
(3) Select Team->Share Project
(4) Follow the wizard