git

Splitting up a .NET solution/Git repo for multiple apps

I currently have a single solution that contains both the one application developed so far and projects for all of the homegrown libraries. This entire solution is also kept in a single Git repo. I am now going to be developing a second application that will make use of those same libraries. That application will have different releas...

How to delete erroneous merge commits?

Through a comedy of noob errors I find myself in the following situation in a local repo: Using git reset I have maneuvered the branch tags to where I want them, and I would now like to delete the 3 commits on what looks like an unnamed branch. I have researched/tried a variety of things including gc, prune without success. I realiz...

Creating SSH keys for Gerrit and Hudson

I'm trying to use the Hudson Gerrit Trigger plug-in. For whatever reason, Gerrit is not accepting the SSH key located at /var/lib/hudson/.ssh/id_rsa. In the GUI I get Connection error : com.jcraft.jsch.JSchException: Auth fail as an error, and when I'm working in the terminal I get a Permission denied (publickey) error. How can I gene...

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 have the common mode...

Best code review tool for GIT

Is there a an open source or free code review tool that works best with GIT? 1.Have tried gerrit but is there a better open source or free code review tool? 2.Is there a code review that is capable of showing changes in the web before the user commits to the repository? Does ReviewBoard or any other tools have this feature? ...

Viewing all `git diffs` with vimdiff

I have setup git diff to wrap into vimdiff (using this guide) and it's working as expected unless there are many files with changes. When there are multiple files with changes and I run git diff, it opens the first file and after quitting the first instance of vimdiff I'm presented with the following message: "external diff died, stoppi...

Getting GitHub and Gerrit to play nicely

I host a private repo on GitHub. I also want to use Gerrit, particularly for the Hudson Gerrit Trigger plugin. AFAICT, there isn't any simple solution for using them together. I'd appreciate any help on any of the following wants. What I want Clone GitHub repo and add to Gerrit's projects either: manually, or during init Merge ch...

Git: Create a branch. Commits a bunch. Go back to master branch, only wants to merge certain commits.

I am currently on my master branch. I need some help with CSS but unfortunately my site is protected by authentication. This makes it very difficult for others to come to my site to debug. I was planning to start a new branch, fixing_css, with the first commit removing all authentication mechanism. Then I was thinking of commiting chan...

Find git commits that "rewrite" files

I noticed this line after I committed something just now: [master 6c15628] <Commit message> 1 files changed, 49 insertions(+), 44 deletions(-) rewrite <filename> (63%) Which I think is really cool, that git knew that I rewrote that file (i.e., the rewrite <filename> (63%) part). This has me more interested. Is there any git comman...

Swapping test database connection code as a post-build step

When promoting or deploying a build, I'd like to automate swapping out a single database connection file. This could be done as either a post-build step or as a pre-packaging step before deployment. The file that's being swapped out is a test file; the file being swapped in should have the real database connection configuration. How ca...

GIT: "fatal: unable to write new_index file" while commit.

When I try to commit changes to local repo, I have got following message: fatal: unable to write new_index file ...

pull a git folder instead of the entire tree

Is it possible to pull/clone only one folder from a git repository instead of of the whole structure? ...

how to ignore .gitignore action when cloning?

hello I wanna to ignore .gitignore action when cloning ? for example) Repository has following files. A.txt B.o .gitignore <- .gitignore defines *.o So my local repository has only A.txt when cloning. But I want to have A.txt B.o .gitignore when cloning. Thank you thenducks! ...

Move commits from master onto a branch using git

I'm trying to learn how to use Git effectively and I'm wondering how I should (good practice/bad practice?) solve the following case: Say I have the following chain of commits in master: Initial commit Commit 1 Commit 2 Commit 3 Then I realize that what's done in the last two commits is completely wrong and I need to start from Comm...

Recommended .gitignore file for Python projects?

I'm trying to collect some of my default settings, and one thing I realized I don't have a standard for is .gitignore files. There's a great thread showing a good .gitignore for Visual Studio projects, but I don't see many recommendations for Python and related tools (PyGTK, Django). So far, I have... *.pyc *.pyo ...for the compiled ...

is it possible to ignore .gitignore rules in subdirectory?

hello I want to ignore all of .gitignore rules in subdirectory except .gitignore rules in root. for example) I have already .gitignore file in a directory structure /a. And also have .gitignore file in /a/b. Assume /a have a.txt b.txt files. /a/b has .config file. .gitignore defines .config in /a/b. .config file will be ignored by ...

git hook syntax check

Trying to make a php syntax check hook for a git repository. I was happy when I found a snipped that does exactly this. But it seems that the snippet script has a flaw. It executes git diff-index --cached --name-only HEAD to get a list of files in the index. Now it runs php -l for each file on that list. The flaw is that a file migh...

Suggestions for Distributed Version Control in Eclipse

We're a small software company that has been using CVS and SVN for version control (and Eclipse for writing code) for about 10 years. We're now considering switching some of our projects to use a distributed version control system. We're looking to use something like git, mercurial, etc. But--and here's the key--our new system has to...

git rebase, "would be overwritten", and "No changes - did you forget to use 'git add'?"

git rebase does not appear to work properly in certain cases where a file is added to the repository, then removed from the repository, then added to the working directory (but not the repository). Here's a more specific description of my problem: if a branch is created and switched to from some trunk, and a file X is added and commit...

Merge two git repository by applying one ontop of another

I have two git repositories, one "upstream", that somewhat contains the code from upstream author ( was reacted by an ad-hoc script parsing his in-house rev store ), and the other is the repository I've been working in, which is based on one revision on the upstream repository, but uncertain which. I've tried going an git rebase, but i...