Tag: java

Should I be checking in these gradle files?

Should the following modified files be checked in into a repo? I am guessing not but since I am new to the tools around Java, I thought I’d ask. modified: .gradle/3.5.1/fileContent/annotation-processors.bin modified: .gradle/3.5.1/fileContent/fileContent.lock modified: .gradle/3.5.1/taskHistory/fileHashes.bin modified: .gradle/3.5.1/taskHistory/fileSnapshots.bin modified: .gradle/3.5.1/taskHistory/jvmClassSignatures.bin modified: .gradle/3.5.1/taskHistory/taskHistory.bin modified: .gradle/3.5.1/taskHistory/taskHistory.lock modified: .idea/workspace.xml What gitignore rule will take care of any files from […]

How to compile the Android runtime (ART) from source

I am trying to compile the Android runtime using the Android NDK. First I cloned the repository and switched to the marshmallow-cts-release branch. Then when running ndk-build I get suici@HP-Pavilion-g7:~/art$ ndk-build Android NDK: Could not find application project directory ! Android NDK: Please define the NDK_PROJECT_PATH variable to point to it. /usr/local/src/android-sdk-linux_x86/ndk-bundle/build/core/build-local.mk:151: *** Android NDK: […]

JGit: Use TreeWalk to get content of file

I want to get content of files. The input is the revision. How I can get content of files that in working directory or stage area for example if I have file ‘Test’ with value ‘1’ If I did change to ‘2’ and stage the file now I did another change on the same file […]

Eclipse Git: Can't add folder to index

I’m using Eclipse for a Game Project using LibGdx as framework and Grandle (god I hate it). I’m trying to push the repositories to GitHub, but I can’t stage the “core” folder in the commit. It’s considered unstaged. When I try RightClick -> “Add to Index” it does and says nothing… As it maybe usefull […]

Working with a remote repository in JGit

I am working on a project where we have to use JGit. I have a problem when I try to work with a remote git repository (the git that is not cloned in my local device) I receive the following exception: No HEAD exists and no explicit starting revision was specified If I clone the […]

Create orphan branch and rm -rf in JGit

I’m using JGit to create an orphan branch as outlined on this answer. What is the equivalent command rm .git/index; git clean -fdx in JGit? I’m able to create a new branch normally without the –orphan argument, but am unsure how to apply it as well as the command to delete the branched files, which […]

How to test extract of files

I build a module in java that extract archives such as rar, zip and 7zip. I want to write unit tests for this module with all the cases : Archive with single file Archive with few files Archive with folders and files Large archives I made test files for every case and add them to […]

Project lost when pushing to github from Eclipse

I have a Java project I was working on using Eclipse. Eveything was fine until I decided to push it to a github repository. I did all the steps and then an error message popped up saying Problem occured when pushing to upstream or something like that. I went back to check out the project […]

Push to GitLab with JGit authorization error

I am able to clone from GitLab via JGit, but when I go to push the changes, I get a not authorized error message. Three more essential details: I own the repository so it’s not an issue with read-only access. The repository is private so I know the OAuth 2 token is valid and being […]

Confused about Git (EGit) – Project in workspace is the same with project in local repository

I am currently developing a project and I decided to use Git for my version control. I came accross this confusion. Here is what I did. Assuming I already installed EGit in my Eclipse. I created a new Java project. Right click > Team > Share Project… > Git I specified my local repository name […]

Git Baby is a git and github fan, let's start git clone.