How to pull specific directory with git

I have a project with git, and I just want to clone or pull a specific directory, like myproject/javascript just like subversion does. make some changes, commit and push back again. It’s possible?

What are the “loose objects” that the Git GUI refers to?

When I open the Git GUI, I get a popup message that refers to loose objects. I did git gc and that removed the message. What are loose objects and how could I prevent this from occurring again?

How do I move an existing Git submodule within a Git repository?

I would like to change the directory name of a Git submodule in my Git superproject. Lets suppose I have the following entry in my .gitmodules file: [submodule “.emacs.d/vimpulse”] path = .emacs.d/vimpulse url = git:// What do I have to type to move the .emacs.d/vimpulse directory to .emacs.d/vendor/vimpulse without deleting it first (explained here and […]

how do you push only some of your local git commits?

Suppose I have 5 local commits. I want to push only 2 of them to a centralized repo (using an SVN-style workflow). How do I do this? This did not work: git checkout HEAD~3 #set head to three commits ago git push #attempt push from that head That ends up pushing all 5 local commits. […]

Eclipse git checkout (aka, revert)

Is it possible to do the equivalent of git checkout from within Eclipse using the EGit plugin? I have a file that’s been modified. I want to discards the changes and revert the file back to what’s in the source repository. In Subversion this is called revert. In git the equivalent is checkout. I can’t […]

How to tell if a file is git tracked (by shell exit code)?

Is there a way to tell if a file is being tracked by running some git command and checking its exit code? In other words: is git tracking a file?

Git asks for username every time I push

Whenever I try to push into my repo git asks for both username & password. I have no problem in re-entering my password each time but the problem is in entering username. I use https to clone my repository. So, how can I configure git so that it doesn’t asks for username on each git […]

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: […]

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