Git unexpectedly ignoring files excluded in .gitignore

My .gitignore file contains the following lines: make/ !make/*.mak When I run “git add make/file.mak” I get the following error: The following paths are ignored by one of your .gitignore files: make Use -f if you really want to add them. fatal: no files added Why am I getting this error when I added make/file.mak […]

Git's subtree merge strategy doesn't pick the right directory

I have a repository that looks something like this: foo/ subrepo/ a_file_in_subrepo another.ext unrelated_file subrepo is a repository on github, and I have a remote in my repository, say sub, that tracks it, but none of the files are merged. What I want is to merge in sub/master at the subrepo folder. I know that […]

overwritten git repo with old version of git repo, game over?

Have I totally lost all my commits? I know it was dumb, and for that I am sorry, but it was an innocent mistake, not thinking a workflow through properly. EDIT the overwrite was a manual drag and drop, no terminal commands entered. I am on a mac. I have time machine, and can retrieve […]

git removing commit history of some files from a branch

i’ve started development of some little project and did not use feature branches. now i would like to release a little part of this project, because it’s stable enough to get released. what i would like to do is: create a “release” branch with only the commits of this part of the project and ideally […]

git-commit-notifier with gmail

First of all you have to know I’m total Ruby noob 🙂 I installed git-commit-notifier (http://github.com/ilozka/git-commit-notifier) on my system (Ubuntu 10.04) and followed all the installation instructions but every time I push to my git repository I get this error message: remote: Sending mail… remote: /usr/lib/ruby/1.8/net/smtp.rb:944:in `check_auth_response’: 530 5.7.0 Must issue a STARTTLS command first. […]

Version controlling both source and output file

I’ll try to explain with a scenario: a website. Assume that you need a particular graphical element so you choose to create a PSD file for it and you put it under version control. But for maintaining the coherence between commits you should also submit the generated PNG file. Is this the proper approach to […]

Resolving git repo with master branch and a second branch name MASTER

When switching back from a local branch, I accidentally checked out a new branch, MASTER, and pushed it to origin. Now the repo has master and MASTER as branches. How do I safely rename MASTER and rebase it into master? Thanks!

How to create a GitHub repository from multiple local non-git versions

Let’s say I’ve been using a small free/open-source code library for a few years, and the project’s maintainer/developer does not use any version control system. Instead, new releases are added to a publicly-accessible directory on an ftp server (in other words, the way free software used to be distributed). Consequently, I now have a folder […]

How do you manage production websites and settings with GIT?

I’m dealing with a django project that we are pushing live even as I write this. The production server is a linode and as part of the setup we have SSL and certificates and several differences from development and QA. In my settings.py, I have the following code: import socket hostname = socket.gethostname().lower().replace(‘-‘, ‘_’).split(‘.’)[0] try: […]

Multiple users in git, coming from using mercurial

I’m using git for a class project so I can work with my team. I used mercurial last semester for this but have switched to git since msysgit has a portable version. In mercurial, when 2 users made changes from the same changeset, one pushes, and the others commits would become a separate branch that […]

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