git

Using git-svn, if I have multiple commits not in svn, how do I only push selected commits to svn?

Let's say I have multiple commits in my local git repository that have not been pushed to svn. For example, these four commits on master. A <-- B <-- C <-- D A is the oldest commit not in svn and D is the newest commit. How do I use git svn dcommit to only push A and B to svn, but keep C and D only in my local git repository? Alter...

Putting git hooks into repository

Is it considered to be a bad practice - to put .git/hooks into the projects repository (using symlinks, for example). If yes, what is the best way to deliver same hooks to different git users? thanks in advance for any answers. ...

How do I remove an author from a git repository?

If I create a Git repository and publish it publicly (e.g. on GitHub etc.), and I get a request from a contributor to the repository to remove or obscure their name for whatever reason, is there a way of doing so easily? Basically, I have had such a request and may want to replace their name and e-mail address with something like "Anony...

What are the commands for using Git Bash in Windows e.g. when in git diff mode?

In Windows, in Git Bash, if I do a git diff I get all the differences flushed to the console with some sort of prompt to control the output buffer. What are the commands I can use in this mode of Git Bash? I don't know where to look for a quick reference. I've worked out that <Enter> will scroll one line, and <Space> will scroll all lin...

Download Android code for Contacts application.

I am trying to download Android source code for Contact,Dialer and CallLog applications from the git repository. I have tried the following on my mac(running SnowLeopard): 1. Create a bin dir and a android dir for putting all the downloaded files 2. Added both of the directories to the PATH environment variable 3. run the following comma...

Git "shortcut" for filepath?

Is there some shortcut for filepath, because it's very annoying write full path again and again? Some kind regular expression or something else. I know, I can use "Tab" key, but... UPDATE: Windows and default sh.exe from Git ...

Conflicts with `git rebase`

So, yesterday I posted a question regarding some weird conflicts when I tried to rebase an upstream branch into my local topic branch. In the end I used git rebase --merge upstream and solved a lot of conflicts in files I haven't touched since the previous rebase. My understanding of rebase in such a case is that it detaches my commits...

git: how to reliably switch to a detached HEAD and then restore HEAD later, all from a script

So here's the scenario. I've got a script that runs some tests. I need to make another script that accepts as a parameter a git commit name and then does the following: Switches to a detached HEAD at the specified commit Runs the test script against that commit Switches back so HEAD is the same as it was before this business I need t...

Make terminal open a file with default editor

Is there a way I can say open file.php in the terminal and have jEdit open the file.php? Now I have to go to a finder window and find the file...which there are too many files and the order of the files keeps changing even though I specify by name. Note: I am working on a remote server. I login via ssh and am using a git repository. I w...

Maven - format code and check-in

I am using Hudson to build my projects periodically. I want Hudson to format my code (using Jalopy) and then check-in the changes to github.com. I already have Jalopy configured the way I like, I just need to configure the scm plugin to check-in the changes. ...

Source control when working on open source projects

How do people who aren't committers on open source projects keep their changes on source control before they are ready to submit a patch? Specifically, say I'm working on an apache project like Hadoop. I would like to be able to maintain the original subversion bindings (for things like checking project history, looking at a specific r...

How to pull a series of commits in git one at a time?

I have a series of commits in a fork that I want to apply or reject one at a time to my fork. Should I use git cherry-pick for this? ...

Remove file from the repository but keep it locally

I have a folder which I'd like to remove in my remote repository. I'd like to delete it, but keep the folder in my computer ...

Getting git svn to dcommit master to trunk again.

I have a git clone of a Subversion repository that has the standard trunk/branches/tags layout. I cloned the repository using the --stdlayout option. I created a branch using git svn branch -m "Creating new branch." mybranch And then checked it out using git checkout --track -b mybranch remotes/mybranch I made a few commits and mer...

Git hooks - propagating from remote repository?

I'm currently looking to convert an existing SVN repository to git, and then to use Reviewboard for reviews before allowing pushes. I've only recently started using git and am far from an expert on it, however what I would like to do is have a pre-push hook which runs "post-review" to submit the changes to ReviewBoard. I have a hook wo...

How do I list all remote branches in Git 1.7+?

I've tried git branch -r, but that only lists remote branches that I've tracked locally. How do I find the list of those that I haven't? (It doesn't matter to me whether the command lists all remote branches or only those that are untracked.) ...

Eclipse Java Projects in Git

I am trying to figure out the best way to create a java project in GIT. In particular I would like to create the git repository such that when I import from git in eclipse, the project is automatically created correctly with all its .project settings intact and all other settings setup. I.E. if I do a git clone javaEclipseProject in my w...

Git repository was suddenly broken

My git repository was suddenly broken. I had been working as usual, but when I typed in git status to see my changes, it said: error: inflate: data stream error (incorrect data check) fatal: object 0dbfde4875a5f9c5fe25b4d1b9d34ab58986501e is corrupted What can I do to recover my repository? ...

Git Merge - Incomplete, Missing files and Folders

I was trying to merge a dev branch into master. git checkout master git pull . dev Everything seemed to go well, although there were conflicts I fixed these and commited. But when I checked this newly merged working tree is missing a lot of folders and files from dev. git status // Shows conflicts & doesn't list some files/folde...

Git diff ignore

Is it somehow possible to ignore certain files during git diff? I'm specifically interested in filtering out Makefile.in, Makefile, configure (and all that auto-generated crap). ...