Importing one git repo as a branch into another git repo

For historic reason we have source code for different version in different git repositories. So while Project A holds the version X of the source Project B holds version Y of the source. Do you guys know a way to import Project B as a branch of Project A? Thanks

Create a GitHub webhook for when a pull request is accepted & merged to master

I have a webhook that currently fires on push to any branch. This triggers the webhook far too frequently. Ideally, the webhook would only fire when a pull request is merged into master. I don’t see that as an option, though: Is there a way to get additional webhook options or to customize the webhook […]

Prevent pushes to git containing tabs in certain files (e.g. *.cpp, *.h, CMakeLists.txt)

I’d like my remote repository to refuse any pushes that contains a file that contains a tab, but only if the file belongs in a certain class (based on the filename). Is that possible? I have looked a bit at the update hook in githooks, and I think that is the correct one. So in […]

Automatic version number both in (setuptools) AND source code?

SITUATION: I have a python library, which is controlled by git, and bundled with distutils/setuptools. And I want to automatically generate version number based on git tags, both for sdist and alike commands, and for the library itself. For the first task I can use git describe or alike solutions (see How can I […]

Git-based content management?

I’m looking for a Ruby CMS (or plugin) that can serve and edit content located in a Git repository. I’m sick of having my content in a db. Users, settings, comments, fine. But no more content. Each live edit to a page will need to be automatically, immediately committed to prevent the need for server-side […]

How do I get my git merge conflicts back after merging incorrectly?

I’m trying to merge 2 branches that have a lot of changes in them, several with merge conflicts. I merged the files using git mergetool, but I’ve subsequently realized that I merged a couple of them incorrectly. I basically want to go back to the conflicted state for those couple files, so I can re-run […]

How to track but not stage and how to unstage but not untrack?

I have two concise questions: How I can track files but without staging them ? How I can unstage files for commit without untracking them ? NOTE: I know that I can do an initial commit to track the files and start from there with my files tracked. But is possible to specifically do what […]

Installing Openstack errors

I have no experience in openstack and would appreciate anyone who can help and guide me with this issue. I’m installing openstack in virtual environment (Ubuntu 12.04) and this came out: git clone git// Cloning into ‘/opt/stack/requirements’… fatal:unable to connect to[0:]: errno=Connection refused[1: 2001:4800:7813:516:3bc3:d7f6:ff04:aacb]: errno=Network is unreachable

Heroku — deployment from multiple computers?

I have two computers and I want both of them to be able to pull/push from the same repo on github as well as deploy to the same app on heroku. I know that Heroku allows you to clone its git repo on another computer so it can be linked up too, but I don’t […]

How to I add something to the .gitignore so that the match is not recursive?

How to I add something to the .gitignore so that the match is not recursive? For example, I wish to ignore the directory foo and the file bar.txt in the current directory, but not any that exist in subdirectories. I have tried this for my .gitignore file: foo/ bar.txt But unfortunately git applies this recursively, […]

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