Git Ignores and Maven targets

Anyone know if it is possible to ignore all the instances of a particular directory in a file structure managed by git. I’m looking to exclude all the ‘target’ folders in a maven project with a number of submodules. I know I can explicitly exclude each of them in a top level .gitignore, but I’d […]

Git: refname 'master' is ambiguous

I’ve looked at all of the other ambiguous refname questions and none of them seem to help. Why am I getting this warning? $ git checkout master warning: refname ‘master’ is ambiguous. $ git show-ref master eef61c00da690f093063ac5a728e22fd21648104 refs/heads/master $ git branch -a checkers exercises * master $ git remote -v $

Gerrit error when Change-Id in commit messages are missing

I set up a branch in the remote repository and made some commits on that branch. Now I want to merge the remote branch to the remote master. Basically follows are my operations: checkout branch checkout master merge branch and fix merging errors commit push origin HEAD:refs/for/master But get error messages on the 5th step: […]

How to import a GIT non-Eclipse Java project into Eclipse?

I have some problems importing a Java project into my workspace. I am following this tutorial – however I can not use the final Import existing projects step because the GIT repository I use does not include the Eclipse specific .project and .classpath files. Use the New Projects wizard Therefore the project is not recognizes […]

GIT fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree

I’m trying to initialize a new GIT repo from Debian (actually a VM on Virtualbox, installed and running on Mac OS X) : [david@server-VM-001:~ $] mkdir test [david@server-VM-001:~ $] cd test [david@server-VM-001:test $] git init Initialized empty Git repository in /home/david/test/.git/ fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree. Use […]

Differences between “git pull” commands when pulling from origin?

What are the differences between these commands?: # 1 git pull # 2 git pull origin # 3 git pull origin master # 4 git pull origin/master # 5 git pull origin HEAD:master

Find files in git repo over x megabytes, that don't exist in HEAD

I have a Git repository I store random things in. Mostly random scripts, text files, websites I’ve designed and so on. There are some large binary files I have deleted over time (generally 1-5MB), which are sitting around increasing the size of the repository, which I don’t need in the revision history. Basically I want […]

Highly coupled git submodules

I have a project which needs to be split into two repositories: a set of common models, and a simulation based on those models, with additional code. Ultimately there may be multiple simulations using the same set of models, so having them in a separate repository is a definite requirement. The obvious solution is to […]

Dynamically Fill Jenkins Choice Parameter With Git Branches In a Specified Repo

I have a parameterized Jenkins job which requires the input of a specific Git branch in a specific Git repo. Currently this parameter is a string parameter. Is there any way to make this parameter a choice parameter and dynamically fill the drop down list with the Git branches? I don’t want to require someone […]

How to reverse apply a stash?

I have a small patch saved away in my git stash. I’ve applied it to my working copy using git stash apply. Now, I’d like to back out those changes by reverse applying the patch (kind of like what git revert would do but against the stash). Does anyone know how to do this? Clarification: […]

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