Tag: java

How to get git informations with Java?

Is there any way to retrieve git information programmatically using Java? I would like to know: All branches in current repository-directory Current branch of my working project All committed informations In addition can I execute git processes (commit, rollback, checkout, delete branch, etc.) using Java? I really do appreciate any suggestions .. Thanks

Interact with remote Mercurial and Git http repositories

Background: I’m writing a Java server application that needs to perform basic interactions with remote SCM systems served over http. Is it possible to interact with Mercurial and Git repositories using some sort of predefined API (or if there is a convention to how these repositories are laid out when served via http) from the […]

Maven prevent build if there is uncommitted changes

Is there any way to check if there is not committed files or untracked files in git repo and prevent maven build? I mean if I run mvn install And install should fail with warning that there is something to commit. I need this because I want to know hash of commit which corresponds to […]

Reverting source code to Java after IntelliJ's Kotlin > Java conversion

So I wanted to try out converting our backend API source code which is written in Java and see how it looks (IIRC there is a preview before converting), but once I did it it automatically started converting all the files in the selected folders, and in the end it asked for code corrections, which […]

How to download all possible maven dependencies so they are local

I work behind a very massive firewall that likes to hiccup on random connections, which makes all work with remote repositories a living nightmare for me! I am looking to work with a project from Git (this one https://github.com/mrniko/netty-socketio) which heavily utilizes maven for downloading dependencies. What I would like to do is on another […]

Retrieving last commit ID / revision number from a deployed application

I would like to have a function returning the last revision / commit ID of the source from which the deployed application / library was built. I have been using the __DATE__ and __TIME__ macros in C++ but this approach has obvious drawbacks. What tools are available to achieve this in an automated manner? I […]

Changing name of project is not reflected on GitHub

I have a java project which I work on using Eclipse ide. I have renamed my project. This updated my .project file and I pushed it to GitHub. But GitHub still shows old project name. Is there any way to change name of project on GitHub? I am using GitBash on windows to interact with […]

Git/Eclipse Workflow

I use Eclipse to edit Java, and use Git for my VCS. Should I have my local repository in my workspace, or outside it, and copy the files every time I want to commit? I know I can do it every way, but I’m new to Git, and wondering which way is better.

Encoding Issues in Eclipse for Mac and for Windows

I have a strange problem. I’m using a Windows laptop and a Mac Air for Android development. I use Eclipse as IDE in both of them, Git and GitHub for source code control, and EGit plugin for Eclipse. Sometimes I use non-English (in fact, Russian) language for comments. And here some strange things occur: when […]

How do I do commit a renamed file with case-sensitive using TortoiseGit?

I am trying a sample project to rename a file using Eclipse. First, I did a commit and pushed to GitHub. The file was Samplemain.java. If I rename that file to SampleMain.java and if I try to commit the renamed file using TortoiseGit, I’m unable to commit. Instead, it’s showing an error with a small […]

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