Intellij Idea wrongly consider added zip file to repo as moved from different archive - intellij-idea

I'm using Intellij Idea community 2019.2 to work with Git repository.
I added a zip file to the repo, but during the commit, I noticed that this file considered as moved from completely different zip file from other directory of the repository.
See the screenshot
But the files are different:
awscli-bundle-1.16.314.zip - 19088950 bytes
awsec2monitor-2-1-3.zip - 15495442 bytes
How can I avoid this behavior?

Related

IntelliJ IDEA does not recognize JAVA source directory

Recently I imported the source code of Flink, but IDEA did not recognize the JAVA source directory, resulting in the failure of normal compilation and reading. I found that the generated .Iml file does not contain the JAVA source directory, I can manually mark the source directory. Flink's module has 188+, manual mark is too difficult, what should I do? Thank you
Pictures are as follows
You can try to do:
Close the project File | Close Project
Close the IDE.
Open the project directory in File Explorer and delete all .iml files and the .idea directory.
Re-import the project into IntelliJ from Existing sources.

Open and work on Mulesoft Project from repository

I want to open the Mule project from a repository folder that contains the project with the following folder structure.
I am doing this so I can commit the changes of the project straight to the repository (so others can also download the changes) without having to export and import the project as a zip file every time.
I am getting the following error message and Mulesoft also overwrites the mule.xml file to a blank file.
Is there anything I can do to avoid this from happening?
workspace print screen
option when importing
error message
You need to carry mule-project.xml, .classpath and .project files in the repository in case that you are not using Maven.
Please check / share your gitignore file. Also check the Error Log, there should be description of what is missing.

Intellij IDEA brown highlighted file name

The intellij IDEA shows files and folders as not unversioned but they are already on the remote repository. Is it because these files are imported node modules? Or those these file color mean something else?
The color is because the nodes_modules folder is marked as the library root.
Consider to remove the node_modules from source control. A general best practice is to keep the repository small and without dependencies. If you check in your package.json and package-lock.json anyone who checks out the repository can download the same dependencies and run your project.
This will keep the footprint of your repository small and tidy and makes it faster to download/process (i.e. in a build tool like jenkins).
Tip: after you've removed the node_modules add a .gitignore file to exclude it so it won't be accidentally checked in again.

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.

How to download a bazaar repository with revision history without using the "bzr" Command Line Interface?

I tried downloading the bazar repository from launchpad with revision history using:
bzr branch lp:<repo-name>
This repository includes the .bzr directory which contains the revision history.
However launchpad.net also shows an option of downloading the zip file for some repositories.
The zip file does not contain the .bzr directory. It just contains the source snapshot of the latest version.
In github it is possible to download zip files with complete git revision history (ie. the .git directory is present)
I was wondering if this is possible in Launchpad?
No, I don't think Launchpad has such feature. The zip files you see are packaged by the project owners, not something generated or automatic. They could package zip files including the full history but the purpose is usually the opposite: a release version of the project with no history, only the files.
If you want a zipped version of the full history, you have to do it in two steps: branch and then zip up.
The --no-tree flag might be useful for you. Using that flag with the branch command will create only the .bzr directory without the working tree (the project files).