Category Archives: Git

protocol error: expected old/new/ref, got 'shallow deeb…'

Questions: I am editing a git repository that was cloned using –depth 1 (shallow clone). I want to push my changes (commits) but I get this error: $ git push Counting objects: 14, done. Delta compression using up to 4 threads. Compressing objects: 100% (8/8), done. Writing objects: 100% (8/8), 56.88 KiB | 0 bytes/s,… Read More »

Category: Git

Using git/mercurial on projects with continuous refactoring?

Questions: I am trying to understand if I really have any case for using git/mercurial. The projects I work are java and c# projects, usually with 5-20 people working towards a common goal (the “release”). Most of the developers are professional developers who refactor code all of the time. So where the typical linux kernel… Read More »

git show commit in beyond compare

Questions: I would like to see a specific commit in Beyond Compare or any other separate diff tool while viewing it via git show. I tried looking at help of git show/difftool/config but couldn’t find anything. Does anyone know how it can be done? I’ve looked at Git Diff with Beyond Compare and configured Beyond… Read More »

How do I list just the files that would be committed?

Questions: Is there any way to get a list of files that will be committed when I type the following? git commit -m “my changes” git status lists too much. I could strip out all the words, but I’d rather not. And I don’t want to be told about untracked files. I’ve tried git ls-files… Read More »

Merging multiple branches with git

Questions: I have 2 local repositories called “develop” and “master”; they are similar. On my company’s server there’s 1 “main” repo (production) and several branches that were made by other developers: $ git branch -a * develop master remotes/origin/HEAD -> origin/master remotes/origin/some-test remotes/origin/feature1 remotes/origin/feature2 remotes/origin/master How can I merge remotes/origin/feature1 and remotes/origin/feature2 into my local… Read More »

Git: simplest way of squashing commits on master [duplicate]

Questions: Possible Duplicate: How can I squash my last X commits together using git? I have a project hosted on GitHub and I have a local clone. I have a load of small commits that I have already pushed up to GitHub. This has all been done using the default *master branch. I got confused… Read More »

Convert git repository file encoding

Questions: I have a large CVS repository containing files in ISO-8859-1 and want to convert this to git. Sure I can configure git to use ISO-8859-1 for encoding, but I would like to have it in utf8. Now with tools such as iconv or recode I can convert the encoding for the files in my… Read More »

How to remove old versions of media files from a git repository

Questions: I have a Git repository with several huge media files (images and audio files). Several versions of these media files have been successively commited to the repo. The files are successively refined versions of the same assets, and they have the same name. I want to keep only the latest version in the Git… Read More »