git

How can I get rid of the 'remote: ' messages that appear on every line returned by post-receive in git?

I've created a post-receive hook in git. The hook output messages to the screen, which are sent back to the git client doing the push, and outputted back. How can I get rid of the 'remote: ' text before every single line of output? It's rather distracting. (I know it's possible because I've seen it in practice, I just don't know how it...

Completely remove from history some lines from an old commit

I realized that in a old commit I made some modifications to a file that I partially regret and I don't want anyone to see. The changes for that file in this commit are not all bad, so I need to keep the good ones and this prevents me from simply removing the commit entirely. My goal is to remove the bad lines completely from history w...

How to add a ssh key to connect to git?

I have a file with my DSA private key on my windows 7 computer. How can I add this to my Macbook so I can connect to git from it? (I have my own hosting company with git on it). I ideally want to add this to my bash_profile also if I need to keep this alive somehow... ...

What's the simplest way to edit conflicted files in one go when using git and an editor like Vim or textmate?

Hi guys, I'm trying to tweak a little When I type in git status on the commandline, I get a list of files that need to be resolved like so: # Unmerged paths: # # (use "git reset HEAD <file>..." to unstage) # (use "git add <file>..." to mark resolution) # # both modified: apache2/templates/default/apache2.conf.erb # both ...

How to transfer pgp private&public key to another computer?

I read this article which explained very well how to setup pgp on osx, but I'm planning to use the generated keys for signing git commits, so I figure I need to transfer the keys to my other computer. Is this correct? and if so how do I go about transferring the keys? ...

Github. How do I make changes to what is ignored via .gitignore?

I have an Xcode project that uses git for version control. I have a .gitignore file to ignore the build subdirectory: build/* I recently added a subdirectory that contains an Xcode project and forgot to update the .gitignore file before checking it in. Is there any way to make git ignore the build subdirctory now, after the fact? ...

Why is bundler not installing gems stored in get repo properly?

Bundler version 1.0.0.beta.2 Rvm Info system: uname: "Linux dane-r1f-ubuntu 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010 i686 GNU/Linux" shell: "bash" version: "4.1.5(1)-release" rvm: type: "rvm is a function" version: "rvm 0.1.31 by Wayne E. Seguin ([email protected]) [h...

Eclipse: How to ignore .git subdir when adding one project to another project's build path?

Hi, I'm developing an application that is supposed to run on both Android as well as regular Java SE. I have an eclipse project called foobar-core which contains code that is used both by the Android and the SE version. I have another project called foobar-android, which contains all android-specific code. I need to reference some of ...

Deflate command line tool

I'm looking for a command line wrapper for the DEFLATE algorithm. I have a file (git blog) that is compressed using DEFLATE, and I want to uncompress it. The gzip command does not seem to have an option to directly use the DEFLATE algorithm, rather than the gzip format. Ideally I'm looking for a standard Unix/Linux tool that can do thi...

How can I cut down a git bisect run using file paths?

I'm using git bisect to find a failure inducing commit. However, a lot of the commits in the range are definately irrelevant (because they are commits to the documentation or to unit tests). I'd like to make git bisect automatically skip commits which affect files in certain directories. Is this possible somehow? ...

Cloning a Git repo without the .git directory

Is it possible to clone a repository without git creating a .git folder inside the local copy of the repository? Sort of like a read only functionality? ...

How can I find out what commit(s) git bisect would try next?

In some cases during a git bisect session, testing a particular commit takes quite long (for instance, because I have to build a full release package and deploy it on a particularly strange machine). In fact, testing a build takes so long that I'd like to start building the next two commits already without knowing whether the current tes...

Problem with Hudson + Git + Gitosis on windows

I have git and gitosis running smoothly on windows with msysgit (with OpenSSH), and I would now like Hudson to start using git. So, I have ensured that the hudson windows service is running as the hudson user, and I have added the hudson user through gitosis-admin. I also have unixutils, and they are in the windows path. But, Hudson ...

Git vs Mercurial vs SVN

Possible Duplicates: For home projects, can Mercurial or Git (or other DVCS) provide more advantages over Subversion? What are the relative strengths and weaknesses of Git, Mercurial, and Bazaar? What are some of the differences between these source control system? Which one is the best for a small 2 people project? ...

Grab revisions from SVN and merge with git repository?

I have an SVN branch with several commits that I want to export and merge into a git repository based on the same code (but without the changes). How do I do that? I have tried creating a new git repo using git svn and then merging to git repos together, but that marked every single line in conflicting files as a conflict. Can I force i...

How can I use Git's malloc wrapper in my code?

I want to use the git's malloc and realloc wrappers in my code for OOM(out of memory) conditions. Here is its code: void *xmalloc(size_t size) { void *ret = malloc(size); if (!ret && !size) ret = malloc(1); if (!ret) { release_pack_memory(size, -1); ret = malloc(size); ...

cleaning up old remote git branches

Here is my git workflow. I work from two different computers (A and B) and store a common git remote in dropbox directory. Let's say I have two branches master and devel. Both are tracking their remote counterparts origin/master and origin/devel. Now while on computer A, I delete branch devel - both local and remote - as follows: git...

What's the correct command to revert my files in git?

I'm new to git. I'm working on a project, the files under the project directory are commited, and I just added many files by mistake. They are neither added to git nor commit. Now I want removed them, so I try: git revert HEAD But they are still there, and messages are: C:\WINDOWS\system32\cmd.exe /c git revert HEAD Finished one re...

Using git and svn with multiple developers

I have a svn repository (with no TLB structure if it matters) which I want to use along with git. I can do a git-svn clone, work on my changes in the git repo and commit back to the svn repo whenever I am done. It's clear until this point. I'm not sure how to extend this workflow model to multiple developers. I need my dev team to be a...

Git: tracking only selected entries

I have a directory, in this directory I have many subdirectories. I want to track only 4 of them (I know they names). Many people have access to the top directory, and some of them, sometimes are adding new subdirectories. When I now list the status of the repo with the command git status I get a huge list of 'untracked' entries...