git

Configure (or mimic) svn:externals to include code from Github in a svn-hosted project

We use Subversion locally, and we're working on a project that uses a fork of Fluent NHibernate, which is hosted on Github. I'd like it set up so that a single svn checkout will retrieve everything necessary to build the project, but maintain the ability to fetch HEAD updates from github. Is there any way I can pull code from the Git r...

Display all first-level descendant branches using Git

How can I get a list of branches that are first-level descendants of the current HEAD? I can get a list of the whole tree with: git log --graph --abbrev-commit --pretty=decorate --branches which gives * 2eff4a7... (refs/heads/issue-8351) Added a factory factory factory. * 2e387aa... Refactored all of the factory factories. | * b3fad...

add #*# glob to .gitignore?

I want to add emacs autosave files to my .gitignore with the glob #*# but of course, lines starting with a hash are comment lines. How can I get this into my .gitignore without it being treated as a comment? ...

How to have git repository in NFS partition and working-tree in local partition?

My home directory is in a remotely-mounted NFS partition on a file-server and is routinely backed-up. I would like to have my project's git repository be under my home directory (so that it's backed-up) but I would like my working-tree to be in a local disk partition of my workstation (so that building is fast). The local disk partitio...

Create Eclipse Project from Android Git

I've downloaded one of the open source Android Applications (the music application) from the Android git, and I'm trying to create a new project from the source. Creating a new project using that existing source doesn't work giving me an "invalid description error". Any help? ...

how do you move multiple files in git?

I try: git mv a.py b.py src/ and get fatal: multiple sources for the same target, source=b.py, destination=src/b.py Using the -n flag, like so git mv -n a.py b.py src/ gives me: Checking rename of 'a.py' to 'src/b.py' Checking rename of 'b.py' to 'src/b.py' fatal: multiple sources for the same target, source=b.py, destination=src/b....

Undoing a git pull --rebase

Hey I'm new to git and I need to undo a pull, can anyone help?!? So what I've done is... git commit git stash git pull --rebase git stash pop this created a bunch of conflicts and went a bit wrong. Now doing 'git stash list' reveals that my stash is still there. Is it possible to revert my repo back to the point just after doing git ...

Opposite of `git push --mirror`? How do I get my repo back?

I am having great success with git push --mirror to make backup copies to a bare repo. But after search on SO and elsewhere, I cannot find a way to clone the thing locally with all branches. I do not want to use git clone since I don't want my local repo to know about the bare repo. If I use git pull it only brings down the HEAD branch. ...

Updating a working tree to Git's HEAD

I think I said that all correctly. I've got a staging server with Git on it, my buddy and I push changes to that Git repo from our local clones of that repo, when we're ready to make something public, we tag it 'n all that, but then I have to do a git reset --hard to update the actual files on the server to HEAD, which seems a bit stran...

Can't update submodules (they are empty) after merging branch w/o modules with branch w/ modules

Hi all, I'm using Kohana and recently I wanted to change kohana modules into git submodules for easier updating. To clarify, I will refer to modules as kohana modules (just folders) and submodules to actual git submodules. I switched to master branch and deleted all the modules and replaced them with submodules from http://github.com/...

In git, how do I create a single patch for the last 2+ revisions?

I would like to create a patch for the last 2 revisions. git format-patch -2 gives me 2 patch files, one for each revision git format-patch HEAD~2..HEAD gives the same thing. git format-patch -1 HEAD~2..HEAD gives a single file, but only contains changes for the last revision. Is there any way to do this in git? ...

Using Git with your CakePHP Project

I use git as my primary version control system, and have recently started using git on my CakePHP projects. This is my current .gitignore file: app/tmp vendors/ As used in the cakephp git repo, but this causes a bit more work for me when deploying the project to a server, because I have to go in and create all the app/tmp/ sub-direct...

git synchronization of rebased branches

I recently had a question answered about a multi-computer git development setup, and the solution I got there did solve my situation with the master branch, but not side branches based off the master. Here's my current setup: A--B--C--D master \ E--F--G--H BUG_37 BUG_37 is a branch that is developing a fix to a...

How to push/pull Git rebase

I'd like to use git rebase so as to cleanly merge a feature in the master branch (in less commits or at least at the top of the change log). Note that I'm the only one working on the repository. After reading http://stackoverflow.com/questions/457927/git-workflow-and-rebase-vs-merge-questions, I found git rebase would be pretty nice and...

git: How do I recursively add all files in a directory subtree that match a glob pattern?

I have several .screen files inside /xxx/documentation and its subdirectories that are already tracked by Git. After modifying many of these screen files, I run git add documentation/\\*.screen—as indicated by the first example in git-add's documentation—to stage these files, but the command fails: fatal: pathspec 'documentation/\*.scr...

What's the difference between HEAD^ and HEAD~ in Git?

When I specify an ancestor commit object in Git, I'm confused between HEAD^ and HEAD~. Both have a "numbered" version like HEAD^3 and HEAD~2. They seem very similar or the same to me, but are there any difference? ...

Can I pull a git work-tree?

I have a repository A, and a clone of it, named B. Then, I have edited a file in the A and not commit it. My question is if I can run git pull in B to get the edition in the A? ...

What tools do you use to faciliate Continuous Integration (CI)?

Assuming you're doing CI, the title really says it all: What tools do you use? In our case we're a .NET development shop, and are using Enterprise Cruise Subversion NAnt However we're hitting some performance issues with Subversion and the number of Cruise build agents & pipelines we're running, so are looking at using Git in the ba...

How to remove a file from the index in git?

How to remove a file from the index ( = staging area = cache) without removing it from the file system? Thanks. ...

Is there a script that provides the equivalent to git-bisect for Perforce (p4)?

The git-bisect provides hooks to perform a binary search on revisions and figure out which change broke the design. Is there an equivalent script for Perforce? I did SO and Google searches with no luck. Update Mar 1 2010: As Douglas Leeder correctly pointed out, this is easy with a linear history. However we do have multiple branches...